summaryrefslogtreecommitdiff
path: root/enc/euc_kr.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-13 19:23:52 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-13 19:23:52 +0000
commit19416601a0af3b7c99a570ae6993cb29e4360e64 (patch)
treea7406d81b554109333ea2240825897a87ebdfe4b /enc/euc_kr.c
parent10ff0f292e9b7cd673915fcc32f5d236c95c8d7d (diff)
* 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
Diffstat (limited to 'enc/euc_kr.c')
-rw-r--r--enc/euc_kr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/enc/euc_kr.c b/enc/euc_kr.c
index 1b5ec89..f20a57e 100644
--- a/enc/euc_kr.c
+++ b/enc/euc_kr.c
@@ -145,7 +145,7 @@ euckr_is_code_ctype(OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
#define euckr_islead(c) ((c) < 0xa1 || (c) == 0xff)
static UChar*
-euckr_left_adjust_char_head(const UChar* start, const UChar* s, OnigEncoding enc)
+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.
@@ -157,7 +157,7 @@ euckr_left_adjust_char_head(const UChar* start, const UChar* s, OnigEncoding enc
p = s;
while (!euckr_islead(*p) && p > start) p--;
- len = enclen(enc, p, s);
+ len = enclen(enc, p, end);
if (p + len > s) return (UChar* )p;
p += len;
return (UChar* )(p + ((s - p) & ~1));