summaryrefslogtreecommitdiff
path: root/oniggnu.h
diff options
context:
space:
mode:
authorksaito <ksaito@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-04 14:31:26 +0000
committerksaito <ksaito@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-04 14:31:26 +0000
commit5e853c811ce1d6d6edc187e580a14133667e1058 (patch)
tree4ecf2cb00a79a481ee5aeda802d5bb73415ca8f5 /oniggnu.h
parent67ae0fb9aced8cf56de10a1fd400a236bd753b60 (diff)
This commit was generated by cvs2svn to compensate for changes in r7203,
which included commits to RCS files with non-trunk default branches. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'oniggnu.h')
-rw-r--r--oniggnu.h45
1 files changed, 39 insertions, 6 deletions
diff --git a/oniggnu.h b/oniggnu.h
index d78dc18b11..106cb0303d 100644
--- a/oniggnu.h
+++ b/oniggnu.h
@@ -1,12 +1,33 @@
+#ifndef ONIGGNU_H
+#define ONIGGNU_H
/**********************************************************************
-
oniggnu.h - Oniguruma (regular expression library)
-
- Copyright (C) 2004 K.Kosako (kosako@sofnec.co.jp)
-
**********************************************************************/
-#ifndef ONIGGNU_H
-#define ONIGGNU_H
+/*-
+ * Copyright (c) 2002-2004 K.Kosako <kosako AT sofnec DOT co DOT jp>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
#include "oniguruma.h"
@@ -27,6 +48,18 @@
#define RE_OPTION_POSIXLINE (RE_OPTION_MULTILINE|RE_OPTION_SINGLELINE)
#ifdef RUBY_PLATFORM
+
+#ifndef ONIG_RUBY_M17N
+
+ONIG_EXTERN OnigEncoding OnigEncDefaultCharEncoding;
+
+#undef ismbchar
+#define ismbchar(c) (mbclen((c)) != 1)
+#define mbclen(c) \
+ ONIGENC_MBC_ENC_LEN(OnigEncDefaultCharEncoding, (UChar* )(&c))
+
+#endif /* ifndef ONIG_RUBY_M17N */
+
#define re_mbcinit ruby_re_mbcinit
#define re_compile_pattern ruby_re_compile_pattern
#define re_recompile_pattern ruby_re_recompile_pattern