aboutsummaryrefslogtreecommitdiffstats
path: root/regex.c
diff options
context:
space:
mode:
Diffstat (limited to 'regex.c')
-rw-r--r--regex.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/regex.c b/regex.c
index f26d9b8..7311eab 100644
--- a/regex.c
+++ b/regex.c
@@ -1,4 +1,4 @@
-/* $Id: regex.c,v 1.13 2002/01/16 04:38:06 ukai Exp $ */
+/* $Id: regex.c,v 1.14 2002/01/21 15:56:13 ukai Exp $ */
/*
* regex: Regular expression pattern match library
*
@@ -152,8 +152,15 @@ newRegex0(char **ex, int igncase, Regex *regex, char **msg, int level)
m = RE_WHICH;
while (*p != ']') {
if (*p == '\\') {
- *(st_ptr++) = *(p + 1);
- p += 2;
+ p++;
+#ifdef JP_CHARSET
+ if (IS_KANJI1(*p)) {
+ *(st_ptr++) = RE_KANJI(p);
+ p += 2;
+ }
+ else
+#endif
+ *(st_ptr++) = (unsigned char)*(p++);
}
else if (*p == '-') {
*(st_ptr++) = RE_WHICH_RANGE;