diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2016-08-25 22:10:58 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2016-08-25 22:10:58 +0300 |
commit | 00682d87a1a1c0535c0fa5adb27867578dc76d49 (patch) | |
tree | 604bff488e97735f1a1c14078f02a99610546911 /interpret.h | |
parent | 7453c813457583197fcf0fe1c7d2301d6013bfea (diff) | |
download | egawk-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.h | 14 |
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); } |