Граф коммитов

362 Коммитов

Автор SHA1 Сообщение Дата
naruse 8d4ebdc8fe * enc/unicode/name2ctype.h: Updated to Unicode 5.2.0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-02 16:03:20 +00:00
naruse 48eafcbc49 Updated to Unicode 5.2.0.
* enc/unicode/name2ctype.h.blt, enc/unicode/name2ctype.kwd,
  enc/unicode/name2ctype.src: Updated to Unicode 5.2.0.
  NOTE: when you update these data, download UnicodeData.txt
  and Scripts.txt from http://www.unicode.org/Public/UNIDATA/
  and run
  ruby1.9 tool/enc-unicode.rb UnicodeData.txt Scripts.txt \
  > enc/unicode/name2ctype.kwd

* enc/unicode/Scripts.txt: removed.

* enc/unicode/UnicodeData.txt: removed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-02 13:37:41 +00:00
naruse ee4b59a419 * unicode.c (onigenc_unicode_property_name_to_ctype):
ignore case of properties.

* tool/enc-unicode.rb: downcase properties list.

* enc/unicode/name2ctype.h, enc/unicode/name2ctype.h.blt,
  enc/unicode/name2ctype.kwd, enc/unicode/name2ctype.src:
  follow above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-10 22:54:01 +00:00
nobu 31b7ae00c0 * include/ruby/st.h (st_hash_func): use st_index_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-08 13:10:04 +00:00
naruse 6e6a28183a * unicode.c (PROPERTY_NAME_MAX_SIZE): use MAX_WORD_LENGTH.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-26 17:01:10 +00:00
nobu 1af43ae867 * enc/unicode.c (onigenc_unicode_mbc_case_fold): balanced braces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-26 00:48:49 +00:00
nobu 1fd7f2e57d * enc/unicode/name2ctype.h: updated.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-25 21:54:03 +00:00
naruse f1eff95745 Update Oniguruma's UnicodeData to 5.1.
* tool/enc-unicode.rb: added for generate name2ctype.kwd.
  contributed by Run Paint Run Run [ruby-core:24775]
  use like following:
    ruby19 tool/enc-unicode.rb enc/unicode/UnicodeData.txt \
      enc/unicode/Scripts.txt > enc/unicode/name2ctype.kwd

* enc/unicode.c (CodeRanges): move definitions to name2ctype.h.

* enc/unicode/name2ctype.h.blt, enc/unicode/name2ctype.kwd,
  enc/unicode/name2ctype.src: updated to v5.1.

* enc/unicode/UnicodeData.txt, enc/unicode/Scripts.txt: added v5.1.

* Makefile.in: add rule to generate name2ctype.kwd from
  UnicodeData.txt and Scripts.txt.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-25 16:15:38 +00:00
nobu a7b920686a * enc/unicode/name2ctype.h: split from enc/unicode.c and made a
perfect hash.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-21 08:01:09 +00:00
nobu a606038c6a * enc/utf_8.c (code_to_mbc): suppressed a warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-21 06:37:36 +00:00
nobu e1c9ac6bd9 * enc/unicode.c (CodeRanges): initialized statically.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-19 02:32:49 +00:00
naruse 2b91cbbf11 * enc/Makefile.in (MKDIRS): revert r24525.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-14 08:20:13 +00:00
nobu 24c783e95e * configure.in, Makefile.in (MAKEDIRS): used MKDIR_P instead of
as_mkdir_p.  [ruby-dev:39063]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-13 07:20:16 +00:00
naruse 38107457a3 * enc/encdb.c (ENC_SET_BASE): fix typo. patch by ujihisa [ruby-dev:39004]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-04 03:42:11 +00:00
naruse 8c658137d9 More strict for Big5 series.
* enc/big5.c (EncLen_Big5): back to original Big5 table.
  (EncLen_Big5_HKSCS): for Big5-HKSCS.
  (trans): add the lead byte table for Big5-HKSCS.
  (big5_mbc_enc_len): abstract function for Big5 series.
  (big5_mbc_enc_len): for Big5.
  (big5_hkscs_mbc_enc_len): for Big5-HKSCS.
  (BIG5_HKSCS_P): added.
  (BIG5_ISMB_FIRST): add routine for Big5-HKSCS.
  (big5_hkscs): add for Big5-HKSCS.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-04 00:51:22 +00:00
naruse b3d7273dc1 Add functions and macros for second encoding definitions.
* encoding.c (rb_enc_set_base): Add for setting base encoding
  with their names. this is internal function.

* template/encdb.h.tmpl: specify ENC_SET_BASE for second
  encodings in each encoding files.

* enc/encdb.c (rb_enc_set_base): add a declaration.
  (ENC_SET_BASE): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-04 00:50:59 +00:00
nobu 4fd615943e * enc/big5.c: not executable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-25 04:42:48 +00:00
naruse a8951a5b3a * enc/big5.c: Fix EncLen_BIG5 for Big5-HKSCS. see [ruby-core:24390]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-24 16:15:53 +00:00
duerst 2886207584 * enc/trans/big5.trans, big5-hkscs-tbl.rb:
new Chinese BIG5-HKSCS transcoding (with Tatsuya Mizuno)

* test/ruby/test_transcode.rb: added tests for the above
  (with Tatsuya Mizuno)

* enc/big5.c: Added BIG5-HKSCS as a replicate encoding of BIG5
  (short term solution, needs more work; with Tatsuya Mizuno)

* tool/transcode-tblgen.rb: made 'pat' directly accessible in
  class StrSet


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-24 10:26:18 +00:00
nobu c030cf1975 * ruby.c (process_options), enc/prelude.rb: encdb and transdb are
extension libraries.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-22 05:41:51 +00:00
naruse d9cf0f822f * enc/trans/utf8_mac.trans: remove wrong optimization.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-13 18:55:55 +00:00
naruse 3abca796f4 Fix: DON'T move in_p because before in_p is replaced by buffered data.
* transcode.c: NOMAP is now multibyte direct map.

* transcode.c: remove ASIS.

* transcode_data.h: ditto.

* tool/transcode-tb (ActionMap#generate_info): remove :asis.

* tool/transcode-tb (ActionMap#generate_info): add :nomap0.

* enc/trans/utf8_mac.trans: replace :asis by :nomap0.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-05 00:05:11 +00:00
naruse f207f9fd51 * enc/trans/utf8_mac-tbl.rb: don't use Unicode escape.
* enc/trans/utf8_mac.trans: follow above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-02 01:38:27 +00:00
nobu 8543ecee53 * enc/trans/utf8_mac.trans: get rid of a 1.9 feature for cross
compile.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-30 06:27:51 +00:00
naruse 80705b9fbf Add new transcoder: CP51932 <-> CP50221.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-29 12:50:57 +00:00
naruse d0a4f8ada9 * enc/trans/utf8_mac.trans: Add converter for UTF8-MAC.
* enc/trans/utf8_mac-tbl.rb: ditto.

* test/ruby/test_econv.rb: tests for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-26 14:21:43 +00:00
nobu 15265f8be6 * enc/depend (link_so): replaces $(TARGET) with basename of the
target.  [ruby-talk:330286]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-22 21:51:18 +00:00
usa 39bc33d9a7 * enc/depend: extract comile rules to each target for VC++.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-30 05:13:22 +00:00
nobu c938de20cd * common.mk (distclean-enc, realclean-enc): do not call clean of
enc.mk twice or more.

* enc/depend (cleanobjs): added deffile.

* lib/mkmf.rb (create_makefile): removes deffile at clean instead
  of distclean.

* win32/Makefile.sub (miniruby, LIBRUBY_SO): removes lib and exp
  files.

* win32/Makefile.sub (clean, distclean): have moved to common.mk.

* win32/rmdirs.bat: omits `not empty' message.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-27 02:03:54 +00:00
nobu e24346d6c6 * enc/trans/gb18030.trans: get rid of a 1.9 feature for cross
compile.  [ruby-core:21345]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-14 15:06:19 +00:00
duerst 82c673d3a1 * enc/trans/gb18030.trans, gb18030-tbl.rb:
new Chinese GB18030 transcoding (from Yoshihiro Kambayashi)

* test/ruby/test_transcode.rb: added tests for the above
  (from Yoshihiro Kambayashi)

* transcode_data.h, transcode.c, tool/transcode_tblgen.rb:
  added support for GB18030-specific 4-byte sequences
  (with Yoshihiro Kambayashi)



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-14 11:12:30 +00:00
nobu e668e36b49 * template/{encdb,transdb}.h.tmpl: moved enc/make_encdb.rb and
enc/trans/make_transdb.rb using tool/generic_erb.rb.

* common.mk (encdb.h, transdb.h): generates from avobe template.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-13 09:05:29 +00:00
nobu 4cb8d3316a * enc/trans/make_transdb.rb (converters): should not depend on the
hash order for cross compile.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-13 08:28:14 +00:00
duerst deeade6f3e * enc/trans/gbk.trans, gbk-tbl.rb:
new Chinese GBK transcoding (from Yoshihiro Kambayashi)

* test/ruby/test_transcode.rb: added tests for the above
  (from Yoshihiro Kambayashi)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-04 09:12:14 +00:00
duerst fecce9e5e5 * test/ruby/test_transcode.rb: added tests for GB2312
(from Yoshihiro Kambayashi)

* enc/trans/chinese.trans: set valid byte patterns for
  GB2312 and GB12345


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-04 08:55:04 +00:00
duerst 3bc30f0b73 * enc/trans/big5.trans, big5-tbl.rb:
new Chinese Big5 transcoding (from Yoshihiro Kambayashi)

* test/ruby/test_transcode.rb: added tests for the above
  (from Yoshihiro Kambayashi)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-04 08:40:26 +00:00
naruse 1240916075 change encoding name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-03 14:12:39 +00:00
naruse 2920aaa2d1 * enc/trans/chinese.trans: added for transcoding EUC-CN and GB12345.
* enc/trans/GB/: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-03 06:31:05 +00:00
duerst a28fdecda7 * 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


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-09 09:39:25 +00:00
nobu a6d8d84a9e * enc/depend (clean-srcs): split out from clean.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-08 15:17:52 +00:00
nobu 8e6ad88737 * enc/depend (LIBS): fixed for disable-shared. [ruby-dev:37103]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-17 09:05:19 +00:00
duerst 831e804388 * 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)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-11 05:26:20 +00:00
duerst d37df9fb13 * 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)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-31 09:07:21 +00:00
duerst 6fd14ccae5 * 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


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-30 05:47:01 +00:00
nobu da6300e8f8 * enc/us_ascii.c (us_ascii_mbc_enc_len): made static. a patch by
Tadashi Saito <shiba AT mail2.accsnet.ne.jp> at [ruby-dev:36916]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-24 19:00:35 +00:00
duerst b014f1bc02 * 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)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-19 09:15:37 +00:00
duerst 7adbfbb793 * 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


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-18 08:10:57 +00:00
nobu 7485e91f76 * common.mk, enc/depend (enc, trans): targets for sources.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-16 05:34:25 +00:00
akr b968fa97f6 * enc/trans/single_byte.trans (transcode_tblgen_singlebyte): renamed
from transcode_tblgen_windows.
  (transcode_tblgen_iso8859): use transcode_tblgen_singlebyte.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-14 11:33:17 +00:00
duerst 48a303c027 * 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)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-14 04:37:10 +00:00
akr 081c802cb9 * grapheme cluster implementation reverted. [ruby-dev:36375]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-18 12:53:25 +00:00
akr b3d772643e fix typos.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-16 16:59:08 +00:00
akr a67d4fa01c * 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 (graphme_table): defined for extended graphme 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 graphme 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.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-16 16:48:05 +00:00
akr 0675246ba6 * transcode_data.h (rb_transcoder): resetsize_func and resetstate_func
also returns ssize_t.

* enc/trans/iso2022.trans: follow the type change.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-15 02:11:50 +00:00
akr c767be3039 * 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.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-14 18:35:17 +00:00
akr a3c8c0adec * 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.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-14 18:06:20 +00:00
akr 19416601a0 * 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.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-13 19:23:52 +00:00
akr 41d3a01486 * enc/trans/escape.trans: transcoder name renamed to use underscore.
* transcode.c: follow the renaming.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-12 17:30:07 +00:00
naruse d51b061565 * 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.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-11 10:34:59 +00:00
akr 817a623d13 * 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.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-09 16:06:54 +00:00
akr 6270ad5b7f * 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.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-08 14:33:17 +00:00
akr 7de9b10819 * enc/trans/iso2022.trans: upcase to iso-2022-jp.
* enc/emacs_mule.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-07 15:05:12 +00:00
akr 78350a0cc6 * 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.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-07 14:49:05 +00:00
akr a3cfd3233e * enc/trans/escape.trans (hexstr): renamed from str1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-07 11:03:24 +00:00
akr faa1387484 * enc/trans/escape.trans: use transcode_tblgen.
* tool/transcode-tblgen.rb: generate an empty line after str1.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-07 10:46:30 +00:00
akr c0bec2fae1 * 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.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-07 09:13:16 +00:00
akr 020e681eec * 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.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-07 03:13:29 +00:00
akr 76b3063022 * 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.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 14:05:10 +00:00
akr 9f687d7be9 * enc/trans/escape.trans (fun_so_escape_html_attr): fix return type.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 04:43:39 +00:00
akr 091171a286 * 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.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 03:20:51 +00:00
akr a10a5ddaac * enc/trans/escape.trans: new file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-05 21:29:12 +00:00
akr debeb7db77 * enc/trans/newline.trans (universal_newline_finish): new function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-05 11:16:28 +00:00
akr 64b633f069 * enc/trans/newline.trans: record newline types met in universal
newline decoder.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-04 14:20:14 +00:00
akr f6441bf61c * 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.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-03 14:12:06 +00:00
akr 4406629bd6 * enc/trans/japanese.trans: new file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-03 11:09:25 +00:00
naruse 42a48c1e9d * enc/trans/make_transdb.rb: check $(srcdir)/enc/trans before
enc/trans.

* enc/trans/make_transdb.rb: keep names_t.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-03 08:57:18 +00:00
akr 5cea1b07f4 * enc/trans/make_transdb.rb: check foo.c only if foo.trans exists.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-02 11:57:49 +00:00
akr 797faf92d9 * enc/trans/make_transdb.rb: error message improved.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-02 10:20:11 +00:00
akr 298d66296d revert last commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-02 10:12:14 +00:00
akr 01d7d19077 * enc/trans/make_transdb.rb: error message improved.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-02 09:35:38 +00:00
usa 7f8e24d43f * enc/trans/utf_16_32.trans (from_UTF_8): rename from to_UTF_16BE
because it was not collect.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-02 05:06:05 +00:00
yugui 2e094d086a * enc/emacs_mule.c (svn:executable): dropped executable bit.
* enc/make_encdb.rb (svn:executable): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-02 05:04:30 +00:00
akr a2ada174a5 * enc/trans/japanese_euc.trans: splitted from japanese.trans to avoid
compiler limitation.  reported by usa.

* enc/trans/japanese_sjis.trans: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-02 03:39:11 +00:00
akr c5759bfb5b * 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.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-01 18:18:50 +00:00
akr 7908180df1 * 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.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-01 17:40:32 +00:00
akr 752e053a1d * 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.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-01 16:22:49 +00:00
naruse 3960c2f7a7 * enc/euc_jp.c (euc-jp-ms): euc-jp-ms is not EUC-JP not an alias of
eucJP-ms.

* enc/trans/japanese.trans (eucJP-ms): eucJP-ms is the correct
  name of the encoding in Ruby.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-01 08:24:55 +00:00
naruse a7cdd20204 * enc/trans/japanese.trans: fix mapping priority.
IBM extended is prior than NEC selected IBM.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-01 06:16:42 +00:00
nobu c6c4ce81c2 * enc/depend: transdb.c may not present.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-01 05:37:04 +00:00
naruse 7ea3d11e22 * enc/trans/japanese.trans: fix Ruby 1.8 compatibility.
* enc/trans/japanese.trans: fix mapping priority. [ruby-dev:36068]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-01 05:27:48 +00:00
akr 8841969485 * 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.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-31 17:35:00 +00:00
naruse 3d8043d062 * enc/trans/eucjp-tbl.rb: replace by previous Citrus maps.
* enc/trans/sjis-tble.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-31 16:25:38 +00:00
naruse 1893e19865 * 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.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-31 16:23:04 +00:00
akr d1429c3cc6 * enc/trans/single_byte.trans (us_ascii_map): don't define 8bit bytes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-31 07:37:10 +00:00
naruse 12e61c83cb * enc/emacs_mule.c: fix ctype.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-24 22:10:57 +00:00
akr 2c78899641 * 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 ru.e
  (srcs): newline.c added.

* Makefile.in (BUILTIN_TRANSSRCS): defined.
  (BUILTIN_TRANSOBJS): defined.

* transcode.c (Init_transcode): call Init_newline.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-24 15:58:43 +00:00
naruse cc98d3e440 * enc/emacs_mule.c: support Emacs/Mule internal encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-24 01:58:18 +00:00
akr c0d3881e0e * 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.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-22 16:44:00 +00:00
akr 7a0bea4fd3 * 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.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-16 05:32:42 +00:00
akr a55e167b68 * 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.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-15 23:13:01 +00:00
akr 74a36d5d1f * 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): provede 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.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-14 15:56:39 +00:00
akr 279e612973 fix variable name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-13 05:53:20 +00:00
akr a14d5eb09b * enc/trans/newline.trans (rb_crlf_newline): new transcoder.
(rb_cr_newline): new transcoder.

* transcode.c (trans_open_i): one more exra room for input newline
  converter.
  (rb_trans_open): crlf newline and cr newline implemented.
  (Init_transcode): Encoding::Converter::CRLF_NEWLINE and
  Encoding::Converter::LF_NEWLINE defined.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-13 05:48:57 +00:00
akr 74a2a7bdbf * 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 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.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-13 05:30:42 +00:00
akr 79cd32fe3b * enc/trans/make_transdb.rb: *.erb.c is not used anymore.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 09:43:44 +00:00
usa 6d8c1483d6 * enc/depend: (transvpath_prefix): prefix has no extension, so replace
%s with "".



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 06:19:00 +00:00
nobu 13f1418d54 * enc/Makefile.in (.SUFFIXES): renamed to .trans.
* enc/make_encmake.rb: added --encs and --no-encs options.

* enc/depend (TRANSVPATH): fix for nmake.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 05:25:14 +00:00
akr 94ca2d94de * 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.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 22:44:23 +00:00
akr 2897632f16 * 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.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 07:39:52 +00:00
nobu e3d9fc76e6 * enc/Makefile.in (make-workdir): use MAKEDIRS.
* enc/depend: makes target directory before compile/link.

* tool/transcode-tblgen.rb: creates target directory.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-10 02:45:18 +00:00
akr 139234e1a0 * 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.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-09 06:02:01 +00:00
nobu 1727355a22 * enc/make_encdb.rb, enc/trans/make_transdb.rb: skip nonexistent
directory.  [ruby-dev:35802]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-08 21:37:43 +00:00
akr 6db9e77e64 * enc/trans/utf_16_32.erb.c (fun_so_from_utf_32le): implemented.
(fun_so_to_utf_32le): implemented.
  [ruby-dev:35777]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-08 16:08:50 +00:00
akr 2833d9f95d * 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.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-08 15:48:17 +00:00
nobu a456f022fc * enc/depend (TRANSCSRCS): needs rule_subst to apply.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-08 14:30:05 +00:00
nobu 2293171034 * common.mk (srcs-enc): renamed from transcodes.
* enc/Makefile.in (make-workdir): creates object directories.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-08 07:44:42 +00:00
nobu b917553e68 * common.mk (encdb.h): see both $(srcdir)/enc and enc.
* enc/make_encdb.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-08 07:15:52 +00:00
nobu 2f37e03736 * enc/trans/make_transdb.rb: fix for the case no transdirs are given.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-08 07:09:03 +00:00
nobu 73d3ff0074 * enc/trans/make_transdb.rb: converts only one transcoders for each
basename.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-08 07:03:35 +00:00
naruse b41a687fe6 * common.mk: see both $(srcdir)/enc/trans and enc/trans.
* enc/trans/make_transdb.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-07 19:24:47 +00:00
akr 1504652373 * 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.

nute(23:52:53)% head -40 ChangeLog
Thu Aug  7 23:43:11 2008  Tanaka Akira  <akr@fsij.org>

* 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]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-07 14:53:30 +00:00
nobu 380e558f33 * enc/depend: add transdb.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-07 08:47:58 +00:00
nobu fa3283c7ba * enc/depend: removed needless explicit commands.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-07 05:17:34 +00:00
naruse ec85af4955 * enc/depend: enc/*.c is source but enc/trans/*.c is generated.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-06 20:19:25 +00:00
naruse 508b170dcd * enc/depend: for build in other than srcdir.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-06 19:44:50 +00:00
akr e22b3b773d * tool/transcode-tblgen.rb (transcode_generate_node): code
argument removed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-06 13:42:21 +00:00
akr a016b30844 * enc/depend: transcode table generation depends on
tool/transcode-tblgen.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-06 11:57:32 +00:00
akr fc841ddc66 useless comment removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-06 11:44:08 +00:00
nobu 8db17b30d6 * common.mk (transdb.h): requires transcoders.
* enc/depend (srcs): target for transcoders.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-06 05:40:13 +00:00
usa ce074dcf42 * enc/depend: replace not only $(<:...) but also $<.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-06 05:04:36 +00:00
usa 19e2cdbd47 * win32/Makefile.sub (config.status): export BASERUBY.
* enc/depend: avoid GNU make'ism.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-06 04:55:39 +00:00
akr e90dd02529 * 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.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-05 22:47:44 +00:00
nobu 0031e09170 * common.mk (transcodes), tool/build-transcode: generates transcode
sources.

* enc/trans/{japanese,korean,single_byte,utf_16_32}.c: to be
  autogenerated now.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-05 18:56:42 +00:00
nobu 82e89f1237 * enc/depend: added rules for .c from .erb.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-05 18:15:52 +00:00
akr f694ec83e8 * 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]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-05 12:32:13 +00:00
nobu b84d31c524 * transcode_data.h (TRANSCODE_ERROR): common transcode failure
exception, would be changed later.

* enc/trans/japanese.c (UNSUPPORTED_MODE): unsupported mode transition
  exception.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-05 03:34:52 +00:00
naruse 4de6475690 * enc/trans/japanese.c: add U+FF5E to EUC-JP.
[ruby-dev:35720] [ruby-dev:35722]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-01 16:26:23 +00:00
naruse 4fc3ef70e1 * enc/trans/japanese.c: add support for CP51932,
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-01 14:17:21 +00:00
naruse 35bac2083c * enc/trans/japanese.c: add U+FF0C,
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-01 14:03:14 +00:00
naruse 143b3339e6 * 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]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-01 12:26:56 +00:00
nobu 94ed51b281 * 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.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-14 09:47:33 +00:00
naruse 5b7dfb7c13 * enc/shift_jis.c (code_is_ctype): HALF WIDTH KATAKANA is
a character.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01 10:05:48 +00:00
shyouhei 0ef21e44e7 forgot to commit
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01 09:50:30 +00:00
usa 40612c5bb5 * enc/make_encdb.h: always add ';' at the end of line.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01 08:51:33 +00:00
shyouhei 53cffba8cb * enc/ascii.c: ISO C does not allow extra ';' outside of a
function

  	* enc/us_ascii.c: ditto.

	* enc/utf_8.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01 08:39:10 +00:00
mame d7baa40cac * enc/euc_jp.c (property_name_to_ctype): core dumped when sizeof(int)
differs from sizeof(long).

* enc/shift_jis.c (property_name_to_ctype): ditto.

* enc/unicode.c (onigenc_unicode_property_name_to_ctype): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-17 13:06:34 +00:00
nobu fc0babb4c2 * enc/depend (clean): remove build directories.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-09 12:17:29 +00:00
nobu ce29c17877 * lib/mkmf.rb (configuration): set flags.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-09 12:14:39 +00:00
mame 65670f9400 * 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.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-02 13:30:38 +00:00
naruse 5397015d2e * enc/gb18030.c (gb18030_code_to_mbc): add 0x80000000
for 4bytes character.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-01 19:36:28 +00:00