summaryrefslogtreecommitdiff
path: root/enc/unicode
diff options
context:
space:
mode:
Diffstat (limited to 'enc/unicode')
-rwxr-xr-xenc/unicode/case-folding.rb10
-rw-r--r--enc/unicode/casefold.h39
-rw-r--r--enc/unicode/name2ctype.h23
3 files changed, 44 insertions, 28 deletions
diff --git a/enc/unicode/case-folding.rb b/enc/unicode/case-folding.rb
index 2b503ad65f..ef97baf737 100755
--- a/enc/unicode/case-folding.rb
+++ b/enc/unicode/case-folding.rb
@@ -155,8 +155,16 @@ class CaseFolding
dest.print("/* DO NOT EDIT THIS FILE. */\n")
dest.print("/* Generated by enc/unicode/case-folding.rb */\n\n")
+ versions = version.scan(/\d+/)
+ dest.print("#if defined ONIG_UNICODE_VERSION_STRING && !( \\\n")
+ %w[MAJOR MINOR TEENY].zip(versions) do |n, v|
+ dest.print(" ONIG_UNICODE_VERSION_#{n} == #{v} && \\\n")
+ end
+ dest.print(" 1)\n")
+ dest.print("# error ONIG_UNICODE_VERSION_STRING mismatch\n")
+ dest.print("#endif\n")
dest.print("#define ONIG_UNICODE_VERSION_STRING #{version.dump}\n")
- %w[MAJOR MINOR TEENY].zip(version.scan(/\d+/)) do |n, v|
+ %w[MAJOR MINOR TEENY].zip(versions) do |n, v|
dest.print("#define ONIG_UNICODE_VERSION_#{n} #{v}\n")
end
dest.print("\n")
diff --git a/enc/unicode/casefold.h b/enc/unicode/casefold.h
index 6daed5cc68..1d743e4bc3 100644
--- a/enc/unicode/casefold.h
+++ b/enc/unicode/casefold.h
@@ -1,6 +1,13 @@
/* DO NOT EDIT THIS FILE. */
/* Generated by enc/unicode/case-folding.rb */
+#if defined ONIG_UNICODE_VERSION_STRING && !( \
+ ONIG_UNICODE_VERSION_MAJOR == 8 && \
+ ONIG_UNICODE_VERSION_MINOR == 0 && \
+ ONIG_UNICODE_VERSION_TEENY == 0 && \
+ 1)
+# error ONIG_UNICODE_VERSION_STRING mismatch
+#endif
#define ONIG_UNICODE_VERSION_STRING "8.0.0"
#define ONIG_UNICODE_VERSION_MAJOR 8
#define ONIG_UNICODE_VERSION_MINOR 0
@@ -1337,12 +1344,10 @@ static const CaseFold_11_Type CaseFold_11_Table[] = {
/* maximum key range = 2294, duplicates = 0 */
-#ifdef __GNUC__
-__inline
-#else
-#ifdef __cplusplus
+#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__cplusplus) || defined(__GNUC_STDC_INLINE__)
inline
-#endif
+#elif defined(__GNUC__)
+__inline
#endif
/*ARGSUSED*/
static unsigned int
@@ -4369,12 +4374,10 @@ static const CaseUnfold_11_Type CaseUnfold_11_Table[] = {
/* maximum key range = 1827, duplicates = 0 */
-#ifdef __GNUC__
-__inline
-#else
-#ifdef __cplusplus
+#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__cplusplus) || defined(__GNUC_STDC_INLINE__)
inline
-#endif
+#elif defined(__GNUC__)
+__inline
#endif
/*ARGSUSED*/
static unsigned int
@@ -6004,12 +6007,10 @@ static const CaseUnfold_12_Type CaseUnfold_12_Table[] = {
/* maximum key range = 71, duplicates = 0 */
-#ifdef __GNUC__
-__inline
-#else
-#ifdef __cplusplus
+#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__cplusplus) || defined(__GNUC_STDC_INLINE__)
inline
-#endif
+#elif defined(__GNUC__)
+__inline
#endif
/*ARGSUSED*/
static unsigned int
@@ -6160,12 +6161,10 @@ static const CaseUnfold_13_Type CaseUnfold_13_Table[] = {
/* maximum key range = 20, duplicates = 0 */
-#ifdef __GNUC__
-__inline
-#else
-#ifdef __cplusplus
+#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__cplusplus) || defined(__GNUC_STDC_INLINE__)
inline
-#endif
+#elif defined(__GNUC__)
+__inline
#endif
/*ARGSUSED*/
static unsigned int
diff --git a/enc/unicode/name2ctype.h b/enc/unicode/name2ctype.h
index 8c193dc4a1..d27c544a8f 100644
--- a/enc/unicode/name2ctype.h
+++ b/enc/unicode/name2ctype.h
@@ -28605,8 +28605,8 @@ static const OnigCodePoint CR_Age_8_0[] = {
0xe0100, 0xe01ef,
0xefffe, 0x10ffff,
}; /* CR_Age_8_0 */
-#endif /* USE_UNICODE_AGE_PROPERTIES */
+#endif /* USE_UNICODE_AGE_PROPERTIES */
/* 'In_Basic_Latin': Block */
#define CR_In_Basic_Latin CR_ASCII
@@ -30195,8 +30195,8 @@ static const OnigCodePoint CR_In_No_Block[] = {
0xe0080, 0xe00ff,
0xe01f0, 0xeffff,
}; /* CR_In_No_Block */
-#endif /* USE_UNICODE_PROPERTIES */
+#endif /* USE_UNICODE_PROPERTIES */
static const OnigCodePoint* const CodeRanges[] = {
CR_NEWLINE,
CR_Alpha,
@@ -30747,12 +30747,10 @@ static const struct uniname2ctype_struct *uniname2ctype_p(const char *, unsigned
/* maximum key range = 5324, duplicates = 0 */
#endif /* USE_UNICODE_PROPERTIES */
-#ifdef __GNUC__
-__inline
-#else
-#ifdef __cplusplus
+#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__cplusplus) || defined(__GNUC_STDC_INLINE__)
inline
-#endif
+#elif defined(__GNUC__)
+__inline
#endif
static unsigned int
uniname2ctype_hash (str, len)
@@ -34025,3 +34023,14 @@ uniname2ctype(const UChar *name, unsigned int len)
if (p) return p->ctype;
return -1;
}
+#if defined ONIG_UNICODE_VERSION_STRING && !( \
+ ONIG_UNICODE_VERSION_MAJOR == 8 && \
+ ONIG_UNICODE_VERSION_MINOR == 0 && \
+ ONIG_UNICODE_VERSION_TEENY == 0 && \
+ 1)
+# error ONIG_UNICODE_VERSION_STRING mismatch
+#endif
+#define ONIG_UNICODE_VERSION_STRING "8.0.0"
+#define ONIG_UNICODE_VERSION_MAJOR 8
+#define ONIG_UNICODE_VERSION_MINOR 0
+#define ONIG_UNICODE_VERSION_TEENY 0