diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2020-11-02 20:21:46 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2020-11-02 20:21:46 +0200 |
commit | 0c075409a9a17bbc774880fdf1110251493f5f57 (patch) | |
tree | 342aa6ad703d6cc8bb8b34cda04dffb277204c16 /interpret.h | |
parent | ba3fd3d4ab19184a84720772b861c10ffb595cf0 (diff) | |
download | gawk-0c075409a9a17bbc774880fdf1110251493f5f57.tar.gz |
Rework scalar comparisons to be (more) like in C.
Diffstat (limited to 'interpret.h')
-rw-r--r-- | interpret.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/interpret.h b/interpret.h index fedf5255..40dd39d6 100644 --- a/interpret.h +++ b/interpret.h @@ -486,37 +486,37 @@ uninitialized_scalar: break; case Op_equal: - r = node_Boolean[cmp_scalars(SCALAR_EQ_NEQ) == 0]; + r = node_Boolean[cmp_scalars(SCALAR_EQ)]; UPREF(r); REPLACE(r); break; case Op_notequal: - r = node_Boolean[cmp_scalars(SCALAR_EQ_NEQ) != 0]; + r = node_Boolean[cmp_scalars(SCALAR_NEQ)]; UPREF(r); REPLACE(r); break; case Op_less: - r = node_Boolean[cmp_scalars(SCALAR_RELATIONAL) < 0]; + r = node_Boolean[cmp_scalars(SCALAR_LT)]; UPREF(r); REPLACE(r); break; case Op_greater: - r = node_Boolean[cmp_scalars(SCALAR_RELATIONAL) > 0]; + r = node_Boolean[cmp_scalars(SCALAR_GT)]; UPREF(r); REPLACE(r); break; case Op_leq: - r = node_Boolean[cmp_scalars(SCALAR_RELATIONAL) <= 0]; + r = node_Boolean[cmp_scalars(SCALAR_LE)]; UPREF(r); REPLACE(r); break; case Op_geq: - r = node_Boolean[cmp_scalars(SCALAR_RELATIONAL) >= 0]; + r = node_Boolean[cmp_scalars(SCALAR_GE)]; UPREF(r); REPLACE(r); break; |