aboutsummaryrefslogtreecommitdiffstats
path: root/interpret.h
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-08-25 22:10:58 +0300
committerArnold D. Robbins <arnold@skeeve.com>2016-08-25 22:10:58 +0300
commit00682d87a1a1c0535c0fa5adb27867578dc76d49 (patch)
tree604bff488e97735f1a1c14078f02a99610546911 /interpret.h
parent7453c813457583197fcf0fe1c7d2301d6013bfea (diff)
downloadegawk-00682d87a1a1c0535c0fa5adb27867578dc76d49.tar.gz
egawk-00682d87a1a1c0535c0fa5adb27867578dc76d49.tar.bz2
egawk-00682d87a1a1c0535c0fa5adb27867578dc76d49.zip
New POSIX rules for string comparison.
Diffstat (limited to 'interpret.h')
-rw-r--r--interpret.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/interpret.h b/interpret.h
index 4b8dc472..5aa62a8a 100644
--- a/interpret.h
+++ b/interpret.h
@@ -444,37 +444,37 @@ uninitialized_scalar:
break;
case Op_equal:
- r = node_Boolean[cmp_scalars() == 0];
+ r = node_Boolean[cmp_scalars(SCALAR_EQ_NEQ) == 0];
UPREF(r);
REPLACE(r);
break;
case Op_notequal:
- r = node_Boolean[cmp_scalars() != 0];
+ r = node_Boolean[cmp_scalars(SCALAR_EQ_NEQ) != 0];
UPREF(r);
REPLACE(r);
break;
case Op_less:
- r = node_Boolean[cmp_scalars() < 0];
+ r = node_Boolean[cmp_scalars(SCALAR_RELATIONAL) < 0];
UPREF(r);
REPLACE(r);
break;
case Op_greater:
- r = node_Boolean[cmp_scalars() > 0];
+ r = node_Boolean[cmp_scalars(SCALAR_RELATIONAL) > 0];
UPREF(r);
REPLACE(r);
break;
case Op_leq:
- r = node_Boolean[cmp_scalars() <= 0];
+ r = node_Boolean[cmp_scalars(SCALAR_RELATIONAL) <= 0];
UPREF(r);
REPLACE(r);
break;
case Op_geq:
- r = node_Boolean[cmp_scalars() >= 0];
+ r = node_Boolean[cmp_scalars(SCALAR_RELATIONAL) >= 0];
UPREF(r);
REPLACE(r);
break;
@@ -836,7 +836,7 @@ mod:
} else {
t1 = POP_SCALAR(); /* case value */
t2 = TOP_SCALAR(); /* switch expression */
- di = (cmp_nodes(t2, t1) == 0);
+ di = (cmp_nodes(t2, t1, true) == 0);
DEREF(t1);
}