mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
* oniguruma.h: updated to Oniguruma 5.7.0.
* regsyntax.c, unicode.c: new files along with Oniguruma 5.x. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2cdb1c3376
commit
6ee2e54239
19 changed files with 13900 additions and 5518 deletions
|
@ -198,7 +198,7 @@ static int to_ascii(OnigEncoding enc, UChar *s, UChar *end,
|
|||
if (code >= 0x80) {
|
||||
if (len + 5 <= buf_size) {
|
||||
sprintf((char* )(&(buf[len])), "\\%03o",
|
||||
(unsigned int)(code & 0377));
|
||||
(unsigned int )(code & 0377));
|
||||
len += 5;
|
||||
}
|
||||
else {
|
||||
|
@ -328,13 +328,13 @@ onig_snprintf_with_pattern(buf, bufsize, enc, pat, pat_end, fmt, va_alist)
|
|||
|
||||
p = pat;
|
||||
while (p < pat_end) {
|
||||
if (*p == MC_ESC(enc)) {
|
||||
if (*p == '\\') {
|
||||
*s++ = *p++;
|
||||
len = enc_len(enc, p);
|
||||
while (len-- > 0) *s++ = *p++;
|
||||
}
|
||||
else if (*p == '/') {
|
||||
*s++ = (unsigned char )MC_ESC(enc);
|
||||
*s++ = (unsigned char )'\\';
|
||||
*s++ = *p++;
|
||||
}
|
||||
else if (ONIGENC_IS_MBC_HEAD(enc, p)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue