nobu
6224216294
unused functions and variables
...
* complex.c, rational.c: remove unused functions, which are warned
by clang 5.1, and also variables only used by removed functions.
* ext/date/date_core.c: ditto.
* enc/utf_16be.c, enc/utf_16le.c: comment out constants only used
by commented out functions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-17 04:57:14 +00:00
naruse
0424e152c6
* Merge Onigmo-5.13.1. [ruby-dev:45057] [Feature #5820 ]
...
https://github.com/k-takata/Onigmo
cp reg{comp,enc,error,exec,parse,syntax}.c reg{enc,int,parse}.h
cp oniguruma.h
cp tool/enc-unicode.rb
cp -r enc/
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-17 07:42:23 +00:00
naruse
78df33a0c1
* enc/utf_16le.c: surpress warning: shorten-64-to-32.
...
* ext/dbm/dbm.c: ditto.
* ext/gdbm/gdbm.c: ditto.
* parse.y (Init_ripper): surpress warning: unused value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-21 21:23:42 +00:00
naruse
10354c7b5c
* enc/shift_jis.c (code_to_mbc): cast as int from the subtraction of pointers.
...
* enc/utf_16le.c (utf16le_mbc_enc_len): use ptrdiff_t.
* enc/utf_32be.c (utf32be_left_adjust_char_head): ditto.
* enc/utf_32le.c (utf32le_left_adjust_char_head): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-03 07:37:25 +00:00
nobu
7e3e79d083
* enc/utf_16{be,le}.c (utf16{be,le}_mbc_to_code): simplified.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-01 05:30:25 +00:00
matz
db37773e13
* include/ruby/oniguruma.h: updated to follow Oniguruma 5.9.2.
...
* re.c (make_regexp): use onig_new() instead of onig_alloc_init().
* re.c (rb_reg_to_s): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-01 21:54:59 +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
0682fab6a2
* enc/utf_16{be,le}.c (utf16{be,le}_code_to_mbc):
...
fix codepoint to bytes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-31 10:14:38 +00:00
akr
44cfd58dc5
* 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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-30 03:49:54 +00:00
naruse
904572d2e5
* enc/utf_{16,32}{be,le}.c: remove some ARG_UNUSED. replace struct
...
OnigEncodingST by OnigEncoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-15 14:02:32 +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
nobu
aab064f0dc
* enc/utf_{16,32}{be,le}.c: renamed to match with encoding names.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-08 07:27:43 +00:00