summaryrefslogtreecommitdiff
path: root/regerror.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-05-23 01:32:08 (GMT)
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-05-23 01:32:08 (GMT)
commit6ee2e542394a14a70acd12b3278b2a9fc5b861fc (patch)
tree1341a885b61229d97f5ba2ad7196100f120d81d4 /regerror.c
parent2cdb1c33763d3dda6691ee4b7ffc53e684bd528e (diff)
* 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
Diffstat (limited to 'regerror.c')
-rw-r--r--regerror.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/regerror.c b/regerror.c
index d6ec918..d23b2b0 100644
--- a/regerror.c
+++ b/regerror.c
@@ -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)) {