=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/awk/awkgram.y,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- src/usr.bin/awk/awkgram.y 2020/06/10 21:02:33 1.11 +++ src/usr.bin/awk/awkgram.y 2020/06/10 21:03:56 1.12 @@ -1,4 +1,4 @@ -/* $OpenBSD: awkgram.y,v 1.11 2020/06/10 21:02:33 millert Exp $ */ +/* $OpenBSD: awkgram.y,v 1.12 2020/06/10 21:03:56 millert Exp $ */ /**************************************************************** Copyright (C) Lucent Technologies 1997 All Rights Reserved @@ -33,8 +33,8 @@ Node *beginloc = 0; Node *endloc = 0; -int infunc = 0; /* = 1 if in arglist or body of func */ -int inloop = 0; /* = 1 if in while, for, do */ +bool infunc = false; /* = true if in arglist or body of func */ +int inloop = 0; /* >= 1 if in while, for, do; can't be bool, since loops can next */ char *curfname = 0; /* current function name */ Node *arglist = 0; /* list of args for current function */ %} @@ -183,8 +183,8 @@ { beginloc = linkum(beginloc, $3); $$ = 0; } | XEND lbrace stmtlist '}' { endloc = linkum(endloc, $3); $$ = 0; } - | FUNC funcname '(' varlist rparen {infunc++;} lbrace stmtlist '}' - { infunc--; curfname=0; defn((Cell *)$2, $4, $8); $$ = 0; } + | FUNC funcname '(' varlist rparen {infunc = true;} lbrace stmtlist '}' + { infunc = false; curfname=0; defn((Cell *)$2, $4, $8); $$ = 0; } ; pa_stats: