diff options
author | ksaito <ksaito@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-02-23 12:47:23 +0000 |
---|---|---|
committer | ksaito <ksaito@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-02-23 12:47:23 +0000 |
commit | be587c77ef27f30112bb64459f1da83c0ad1deaa (patch) | |
tree | 3b3fa4a0e4cd874a292de7effb6e2ee0383807d4 /utf8.c | |
parent | f052429aa5a7ba0dfb41e5704ea3de4c970c97da (diff) | |
download | ruby-be587c77ef27f30112bb64459f1da83c0ad1deaa.tar.gz |
* ascii.c, euc_jp.c, oniggnu.h, oniguruma.h, regcomp.c, regenc.c, regenc.h, regerror.c, regexec.c, regint.h, regparse.c, regparse.h, sjis.c, utf8.c: imported Oni Guruma 3.7.0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'utf8.c')
-rw-r--r-- | utf8.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -2,7 +2,7 @@ utf8.c - Oniguruma (regular expression library) **********************************************************************/ /*- - * Copyright (c) 2002-2004 K.Kosako <sndgk393 AT ybb DOT ne DOT jp> + * Copyright (c) 2002-2005 K.Kosako <sndgk393 AT ybb DOT ne DOT jp> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -60,13 +60,13 @@ static int EncLen_UTF8[] = { }; static int -utf8_mbc_enc_len(UChar* p) +utf8_mbc_enc_len(const UChar* p) { return EncLen_UTF8[*p]; } static OnigCodePoint -utf8_mbc_to_code(UChar* p, UChar* end) +utf8_mbc_to_code(const UChar* p, const UChar* end) { int c, len; OnigCodePoint n; @@ -195,9 +195,9 @@ utf8_code_to_mbc(OnigCodePoint code, UChar *buf) } static int -utf8_mbc_to_normalize(OnigAmbigType flag, UChar** pp, UChar* end, UChar* lower) +utf8_mbc_to_normalize(OnigAmbigType flag, const UChar** pp, const UChar* end, UChar* lower) { - UChar* p = *pp; + const UChar* p = *pp; if (ONIGENC_IS_MBC_ASCII(p)) { if (end > p + 1 && @@ -260,9 +260,9 @@ utf8_mbc_to_normalize(OnigAmbigType flag, UChar** pp, UChar* end, UChar* lower) } static int -utf8_is_mbc_ambiguous(OnigAmbigType flag, UChar** pp, UChar* end) +utf8_is_mbc_ambiguous(OnigAmbigType flag, const UChar** pp, const UChar* end) { - UChar* p = *pp; + const UChar* p = *pp; if (ONIGENC_IS_MBC_ASCII(p)) { if (end > p + 1 && @@ -3696,15 +3696,15 @@ utf8_is_code_ctype(OnigCodePoint code, unsigned int ctype) } static UChar* -utf8_left_adjust_char_head(UChar* start, UChar* s) +utf8_left_adjust_char_head(const UChar* start, const UChar* s) { - UChar *p; + const UChar *p; - if (s <= start) return s; + if (s <= start) return (UChar* )s; p = s; while (!utf8_islead(*p) && p > start) p--; - return p; + return (UChar* )p; } OnigEncodingType OnigEncodingUTF8 = { |