diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-06 12:33:45 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-06 12:33:45 +0000 |
commit | edd7c787adc53f70a9d2790076e4c6d77a1f5324 (patch) | |
tree | 0b19582f07ef27790bde97603bd271efb88bcb35 /euc_jp.c | |
parent | 629b1e4324ecfbdb9e953f2a0da74a833786e1e9 (diff) | |
download | ruby-edd7c787adc53f70a9d2790076e4c6d77a1f5324.tar.gz |
* array.c (rb_ary_cycle): typo in rdoc. a patch from Yugui
<yugui@yugui.sakura.ne.jp>. [ruby-dev:31748]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'euc_jp.c')
-rw-r--r-- | euc_jp.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -51,7 +51,7 @@ static const int EncLen_EUCJP[] = { }; static int -mbc_enc_len(const UChar* p) +mbc_enc_len(const UChar* p, const UChar* e) { return EncLen_EUCJP[*p]; } @@ -62,7 +62,7 @@ mbc_to_code(const UChar* p, const UChar* end) int c, i, len; OnigCodePoint n; - len = enc_len(ONIG_ENCODING_EUC_JP, p); + len = enc_len(ONIG_ENCODING_EUC_JP, p, end); n = (OnigCodePoint )*p++; if (len == 1) return n; @@ -113,7 +113,7 @@ code_to_mbc(OnigCodePoint code, UChar *buf) *p++ = (UChar )(code & 0xff); #if 1 - if (enc_len(ONIG_ENCODING_EUC_JP, buf) != (p - buf)) + if (enc_len(ONIG_ENCODING_EUC_JP, buf, p) != (p - buf)) return ONIGENC_ERR_INVALID_WIDE_CHAR_VALUE; #endif return p - buf; @@ -134,7 +134,7 @@ mbc_case_fold(OnigCaseFoldType flag, else { int i; - len = enc_len(ONIG_ENCODING_EUC_JP, p); + len = enc_len(ONIG_ENCODING_EUC_JP, p, end); for (i = 0; i < len; i++) { *lower++ = *p++; } @@ -156,7 +156,7 @@ left_adjust_char_head(const UChar* start, const UChar* s) p = s; while (!eucjp_islead(*p) && p > start) p--; - len = enc_len(ONIG_ENCODING_EUC_JP, p); + len = enc_len(ONIG_ENCODING_EUC_JP, p, s); if (p + len > s) return (UChar* )p; p += len; return (UChar* )(p + ((s - p) & ~1)); |