diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-12 14:30:54 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-12 14:30:54 +0000 |
commit | b92cee1ddbd8c0025ce2e11e3e02d160294556f9 (patch) | |
tree | a9a818afa46dd26a6313ca9f79b75bd0e09678b2 /regerror.c | |
parent | 098ca001752dd6cfd6c044f06e9773fc39536c6e (diff) | |
download | ruby-b92cee1ddbd8c0025ce2e11e3e02d160294556f9.tar.gz |
* re.c, regerror.c, string.c, parse.y, ruby.c, file.c:
use capital letter for \xHH notation. [ruby-dev:32511]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regerror.c')
-rw-r--r-- | regerror.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/regerror.c b/regerror.c index cede3f8da6..5337346033 100644 --- a/regerror.c +++ b/regerror.c @@ -197,7 +197,7 @@ static int to_ascii(OnigEncoding enc, UChar *s, UChar *end, code = ONIGENC_MBC_TO_CODE(enc, p, end); if (code >= 0x80) { if (len + 5 <= buf_size) { - sprintf((char* )(&(buf[len])), "\\x%02x", + sprintf((char* )(&(buf[len])), "\\x%02X", (unsigned int )(code & 0377)); len += 5; } @@ -346,7 +346,7 @@ onig_snprintf_with_pattern(buf, bufsize, enc, pat, pat_end, fmt, va_alist) int blen; while (len-- > 0) { - sprintf((char* )bs, "\\x%02x", *p++ & 0377); + sprintf((char* )bs, "\\x%02X", *p++ & 0377); blen = onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, bs); bp = bs; while (blen-- > 0) *s++ = *bp++; @@ -355,7 +355,7 @@ onig_snprintf_with_pattern(buf, bufsize, enc, pat, pat_end, fmt, va_alist) } else if (!ONIGENC_IS_CODE_PRINT(enc, *p) && !ONIGENC_IS_CODE_SPACE(enc, *p)) { - sprintf((char* )bs, "\\x%02x", *p++ & 0377); + sprintf((char* )bs, "\\x%02X", *p++ & 0377); len = onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, bs); bp = bs; while (len-- > 0) *s++ = *bp++; |