From e3abf333847f3fd21a5bd62cd52efdf80cc6aa15 Mon Sep 17 00:00:00 2001 From: Mitchell Blank Jr Date: Sat, 19 May 2012 23:28:40 -0700 Subject: C++ compilability: "not" is a C++ keyword, avoid it see http://en.cppreference.com/w/cpp/language/operator_alternative --- src/regcomp.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/regcomp.c') diff --git a/src/regcomp.c b/src/regcomp.c index 816e219c7..bb45b3db4 100644 --- a/src/regcomp.c +++ b/src/regcomp.c @@ -1640,8 +1640,8 @@ compile_tree(Node* node, regex_t* reg) switch (NCTYPE(node)->ctype) { case ONIGENC_CTYPE_WORD: - if (NCTYPE(node)->not != 0) op = OP_NOT_WORD; - else op = OP_WORD; + if (NCTYPE(node)->is_not != 0) op = OP_NOT_WORD; + else op = OP_WORD; break; default: return ONIGERR_TYPE_BUG; @@ -2440,8 +2440,8 @@ is_not_included(Node* x, Node* y, regex_t* reg) { switch (ytype) { case NT_CTYPE: - if (NCTYPE(y)->ctype == NCTYPE(x)->ctype && - NCTYPE(y)->not != NCTYPE(x)->not) + if (NCTYPE(y)->ctype == NCTYPE(x)->ctype && + NCTYPE(y)->is_not != NCTYPE(x)->is_not) return 1; else return 0; @@ -2473,7 +2473,7 @@ is_not_included(Node* x, Node* y, regex_t* reg) case NT_CTYPE: switch (NCTYPE(y)->ctype) { case ONIGENC_CTYPE_WORD: - if (NCTYPE(y)->not == 0) { + if (NCTYPE(y)->is_not == 0) { if (IS_NULL(xc->mbuf) && !IS_NCCLASS_NOT(xc)) { for (i = 0; i < SINGLE_BYTE_SIZE; i++) { if (BITSET_AT(xc->bs, i)) { @@ -2550,9 +2550,9 @@ is_not_included(Node* x, Node* y, regex_t* reg) switch (NCTYPE(y)->ctype) { case ONIGENC_CTYPE_WORD: if (ONIGENC_IS_MBC_WORD(reg->enc, xs->s, xs->end)) - return NCTYPE(y)->not; + return NCTYPE(y)->is_not; else - return !(NCTYPE(y)->not); + return !(NCTYPE(y)->is_not); break; default: break; @@ -4668,7 +4668,7 @@ optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env) switch (NCTYPE(node)->ctype) { case ONIGENC_CTYPE_WORD: - if (NCTYPE(node)->not != 0) { + if (NCTYPE(node)->is_not != 0) { for (i = 0; i < SINGLE_BYTE_SIZE; i++) { if (! ONIGENC_IS_CODE_WORD(env->enc, i)) { add_char_opt_map_info(&opt->map, (UChar )i, env->enc); @@ -6170,7 +6170,7 @@ print_indent_tree(FILE* f, Node* node, int indent) fprintf(f, " ", (int )node); switch (NCTYPE(node)->ctype) { case ONIGENC_CTYPE_WORD: - if (NCTYPE(node)->not != 0) + if (NCTYPE(node)->is_not != 0) fputs("not word", f); else fputs("word", f); -- cgit v1.2.3