aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/awk.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/editors/awk.c b/editors/awk.c
index 755e68fc7..0aa7c0804 100644
--- a/editors/awk.c
+++ b/editors/awk.c
@@ -462,8 +462,7 @@ static const uint32_t tokeninfo[] ALIGN4 = {
462 0, 462 0,
463 0, /* \n */ 463 0, /* \n */
464 ST_IF, ST_DO, ST_FOR, OC_BREAK, 464 ST_IF, ST_DO, ST_FOR, OC_BREAK,
465#define TI_PRINT OC_PRINT 465 OC_CONTINUE, OC_DELETE|Rx, OC_PRINT,
466 OC_CONTINUE, OC_DELETE|Rx, TI_PRINT,
467 OC_PRINTF, OC_NEXT, OC_NEXTFILE, 466 OC_PRINTF, OC_NEXT, OC_NEXTFILE,
468 OC_RETURN|Vx, OC_EXIT|Nx, 467 OC_RETURN|Vx, OC_EXIT|Nx,
469 ST_WHILE, 468 ST_WHILE,
@@ -2944,7 +2943,10 @@ static var *evaluate(node *op, var *res)
2944 F = rsm->F; 2943 F = rsm->F;
2945 } 2944 }
2946 2945
2947 if (opinfo == TI_PRINT) { 2946 /* Can't just check 'opinfo == OC_PRINT' here, parser ORs
2947 * additional bits to opinfos of print/printf with redirects
2948 */
2949 if ((opinfo & OPCLSMASK) == OC_PRINT) {
2948 if (!op1) { 2950 if (!op1) {
2949 fputs(getvar_s(intvar[F0]), F); 2951 fputs(getvar_s(intvar[F0]), F);
2950 } else { 2952 } else {