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

15 Коммитов

Автор SHA1 Сообщение Дата
naruse 81e40399fb add references.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-18 06:42:01 +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 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 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
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
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
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
naruse 9c13fc7d89 * 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;
  Minumum 4bytes character is 0x81308130.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-01 18:29:08 +00:00
akr 0ba09d829c fix state definition.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-29 15:35:37 +00:00
akr 86a9215bbf * enc/gb18030.c (gb18030_mbc_enc_len): validation implemented.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-29 08:38:21 +00:00
naruse fe15b86b9d * enc/gbk.c: add GBK, CP936 and CP949.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-29 04:26:30 +00:00
naruse 6e1c3a0f54 * enc/koi8_u.c: added.
* regenc.c, enc/utf_8.c, enc/unicode.c, enc/gb18030.c: add ARG_UNUSED.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-19 15:37:06 +00:00
naruse 0a640a9386 * enc/*: add ARG_UNUSED.
* enc/koi8_u.c: added.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-15 14:54:40 +00:00
naruse edc61cf4c1 * 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.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-15 13:36:18 +00:00
naruse 8f15b8128c * 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.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-13 17:16:09 +00:00