From 3978cd298d1a0fc01c3affb2130b446892edf841 Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Sat, 3 Mar 2018 15:02:56 +0900 Subject: [PATCH] rename cp member to c in OnigValue --- sample/callout.c | 4 ++-- src/ascii.c | 4 ++-- src/oniguruma.h | 2 +- src/regexec.c | 8 ++++---- src/regparse.c | 2 +- src/utf16_be.c | 4 ++-- src/utf16_le.c | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/sample/callout.c b/sample/callout.c index 0bf4451..3e6f737 100644 --- a/sample/callout.c +++ b/sample/callout.c @@ -117,7 +117,7 @@ bar(OnigCalloutArgs* args, void* user_data) fprintf(stdout, "%ld\n", val.l); break; case ONIG_TYPE_CHAR: - fprintf(stdout, "0x%06x\n", val.cp); + fprintf(stdout, "0x%06x\n", val.c); break; case ONIG_TYPE_STRING: fprintf(stdout, "'%s'\n", val.s.start); @@ -218,7 +218,7 @@ extern int main(int argc, char* argv[]) opt_defaults[0].s.start = (UChar* )"I am a option argument's default value."; opt_defaults[0].s.end = opt_defaults[0].s.start + strlen((char* )opt_defaults[0].s.start); - opt_defaults[1].cp = 0x4422; + opt_defaults[1].c = 0x4422; id = onig_set_callout_of_name(enc, ONIG_CALLOUT_TYPE_SINGLE, name, name + strlen((char* )name), diff --git a/src/ascii.c b/src/ascii.c index cf4d484..3da88ed 100644 --- a/src/ascii.c +++ b/src/ascii.c @@ -52,10 +52,10 @@ init(void) name = "ERROR"; BC1_P(name, error, &t_int); name = "MAX"; BC1_B(name, max, &t_long); name = "COUNT"; - args[0] = ONIG_TYPE_CHAR; opts[0].cp = 'p'; + args[0] = ONIG_TYPE_CHAR; opts[0].c = 'p'; BC_B_O(name, count, 1, args, 1, opts); name = "TOTAL_COUNT"; - args[0] = ONIG_TYPE_CHAR; opts[0].cp = 'p'; + args[0] = ONIG_TYPE_CHAR; opts[0].c = 'p'; BC_B_O(name, total_count, 1, args, 1, opts); #endif /* USE_CALLOUT */ diff --git a/src/oniguruma.h b/src/oniguruma.h index b575a25..44eb8e8 100644 --- a/src/oniguruma.h +++ b/src/oniguruma.h @@ -776,7 +776,7 @@ typedef enum { typedef union { int i; long l; - OnigCodePoint cp; + OnigCodePoint c; struct { OnigUChar* start; OnigUChar* end; diff --git a/src/regexec.c b/src/regexec.c index 19a565c..0af30dc 100644 --- a/src/regexec.c +++ b/src/regexec.c @@ -5306,7 +5306,7 @@ onig_builtin_total_count(OnigCalloutArgs* args, void* user_data ARG_UNUSED) r = onig_get_arg_by_callout_args(args, 0, &type, &aval); if (r != ONIG_NORMAL) return r; - count_type = aval.cp; + count_type = aval.c; if (count_type != 'p' && count_type != 's' && count_type != 'f') return ONIGERR_INVALID_CALLOUT_ARG; @@ -5412,11 +5412,11 @@ onig_builtin_monitor(OnigCalloutArgs* args, void* user_data) in = onig_get_callout_in_by_callout_args(args); if (in == ONIG_CALLOUT_IN_PROGRESS) { - if (val.cp == '-') + if (val.c == '-') return ONIG_CALLOUT_SUCCESS; } else { - if (val.cp != '+' && val.cp != '-') + if (val.c != '+' && val.c != '-') return ONIG_CALLOUT_SUCCESS; } @@ -5467,7 +5467,7 @@ onig_setup_builtin_monitors_by_ascii_encoded_name(void) name = "MON"; ts[0] = ONIG_TYPE_CHAR; - opts[0].cp = ' '; + opts[0].c = ' '; BC_B_O(name, monitor, 1, ts, 1, opts); return ONIG_NORMAL; diff --git a/src/regparse.c b/src/regparse.c index 0302e38..f65caa1 100644 --- a/src/regparse.c +++ b/src/regparse.c @@ -6687,7 +6687,7 @@ parse_callout_args(int skip_mode, int cterm, UChar** src, UChar* end, case ONIG_TYPE_CHAR: if (cn != 1) return ONIGERR_INVALID_CALLOUT_ARG; - vals[n].cp = ONIGENC_MBC_TO_CODE(enc, buf, bufend); + vals[n].c = ONIGENC_MBC_TO_CODE(enc, buf, bufend); break; case ONIG_TYPE_STRING: diff --git a/src/utf16_be.c b/src/utf16_be.c index c6820e4..170fac6 100644 --- a/src/utf16_be.c +++ b/src/utf16_be.c @@ -54,10 +54,10 @@ init(void) name = "\000M\000A\000X\000\000"; BC1_B(name, max, &t_long); name = "\000C\000O\000U\000N\000T\000\000"; - args[0] = ONIG_TYPE_CHAR; opts[0].cp = 'p'; + args[0] = ONIG_TYPE_CHAR; opts[0].c = 'p'; BC_B_O(name, count, 1, args, 1, opts); name = "\000T\000O\000T\000A\000L\000_\000C\000O\000U\000N\000T\000\000"; - args[0] = ONIG_TYPE_CHAR; opts[0].cp = 'p'; + args[0] = ONIG_TYPE_CHAR; opts[0].c = 'p'; BC_B_O(name, total_count, 1, args, 1, opts); #endif /* USE_CALLOUT */ diff --git a/src/utf16_le.c b/src/utf16_le.c index d2cdd9e..573c55d 100644 --- a/src/utf16_le.c +++ b/src/utf16_le.c @@ -52,10 +52,10 @@ init(void) name = "M\000A\000X\000\000\000"; BC1_B(name, max, &t_long); name = "C\000O\000U\000N\000T\000\000\000"; - args[0] = ONIG_TYPE_CHAR; opts[0].cp = 'p'; + args[0] = ONIG_TYPE_CHAR; opts[0].c = 'p'; BC_B_O(name, count, 1, args, 1, opts); name = "T\000O\000T\000A\000L\000_\000C\000O\000U\000N\000T\000\000\000"; - args[0] = ONIG_TYPE_CHAR; opts[0].cp = 'p'; + args[0] = ONIG_TYPE_CHAR; opts[0].c = 'p'; BC_B_O(name, total_count, 1, args, 1, opts); #endif /* USE_CALLOUT */ -- 2.40.0