]> git.draconx.ca Git - dxcommon.git/commit
Avoid local array parameters in awk scripts.
authorNick Bowler <nbowler@draconx.ca>
Sun, 3 Dec 2023 05:21:49 +0000 (00:21 -0500)
committerNick Bowler <nbowler@draconx.ca>
Sun, 3 Dec 2023 06:07:51 +0000 (01:07 -0500)
commitda99716d86d4870be554d8412b41a751583da661
tree0bab531996cb1b7f8feac672d568a3da9432286f
parent95d8e7745d9b00097d50d9903d62c48268324e7a
Avoid local array parameters in awk scripts.

ULTRIX 4.5 nawk appears to not support local array parameters on user-
defined functions (it is OK for array arguments passed by the caller).
Things seems to work on the first call but on the second call the array
is not empty and other weird behaviours occur.

Using a global array instead seems OK and avoids the problem.
scripts/gen-options.awk
scripts/gen-strtab.awk
scripts/gen-tree.awk