Commit e3abf333 authored by Mitchell Blank Jr's avatar Mitchell Blank Jr

C++ compilability: "not" is a C++ keyword, avoid it

see http://en.cppreference.com/w/cpp/language/operator_alternative
parent 365cc40a
......@@ -1640,7 +1640,7 @@ compile_tree(Node* node, regex_t* reg)
switch (NCTYPE(node)->ctype) {
case ONIGENC_CTYPE_WORD:
if (NCTYPE(node)->not != 0) op = OP_NOT_WORD;
if (NCTYPE(node)->is_not != 0) op = OP_NOT_WORD;
else op = OP_WORD;
break;
default:
......@@ -2441,7 +2441,7 @@ 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)
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, "<ctype:%x> ", (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);
......
This diff is collapsed.
......@@ -247,7 +247,7 @@ typedef struct {
typedef struct {
NodeBase base;
int ctype;
int not;
int is_not;
} CtypeNode;
typedef struct _Node {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment