diff options
author | Seiji Masugata <masugata@php.net> | 2006-07-20 15:45:07 +0000 |
---|---|---|
committer | Seiji Masugata <masugata@php.net> | 2006-07-20 15:45:07 +0000 |
commit | e95f9a0eeb988b1af6624caf0a708335db9c26e8 (patch) | |
tree | 1af2a7ba5a7ca2c1c57e2f0eb49c2f2826121770 /ext/mbstring/oniguruma/enc/utf16_le.c | |
parent | d6c2c283ed45c5527c3a49f4e4c9087267a4aa87 (diff) | |
download | php-git-e95f9a0eeb988b1af6624caf0a708335db9c26e8.tar.gz |
Updated bundled oniguruma library (used for multibyte regular expression) to 4.2.0.
Diffstat (limited to 'ext/mbstring/oniguruma/enc/utf16_le.c')
-rwxr-xr-x | ext/mbstring/oniguruma/enc/utf16_le.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/mbstring/oniguruma/enc/utf16_le.c b/ext/mbstring/oniguruma/enc/utf16_le.c index db892dcd14..93cc6138a6 100755 --- a/ext/mbstring/oniguruma/enc/utf16_le.c +++ b/ext/mbstring/oniguruma/enc/utf16_le.c @@ -2,7 +2,7 @@ utf16_le.c - Oniguruma (regular expression library) **********************************************************************/ /*- - * Copyright (c) 2002-2005 K.Kosako <sndgk393 AT ybb DOT ne DOT jp> + * Copyright (c) 2002-2006 K.Kosako <sndgk393 AT ybb DOT ne DOT jp> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,7 +32,7 @@ #define UTF16_IS_SURROGATE_FIRST(c) (c >= 0xd8 && c <= 0xdb) #define UTF16_IS_SURROGATE_SECOND(c) (c >= 0xdc && c <= 0xdf) -static int EncLen_UTF16[] = { +static const int EncLen_UTF16[] = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -69,6 +69,12 @@ utf16le_is_mbc_newline(const UChar* p, const UChar* end) if (p + 1 < end) { if (*p == 0x0a && *(p+1) == 0x00) return 1; +#ifdef USE_UNICODE_ALL_LINE_TERMINATORS + if ((*p == 0x0d || *p == 0x85) && *(p+1) == 0x00) + return 1; + if (*(p+1) == 0x20 && (*p == 0x29 || *p == 0x28)) + return 1; +#endif } return 0; } |