]> git.draconx.ca Git - dxcommon.git/commit
gen-strtab.awk: Work around parse issue on HP-UX 11.
authorNick Bowler <nbowler@draconx.ca>
Wed, 4 Jan 2023 02:19:09 +0000 (21:19 -0500)
committerNick Bowler <nbowler@draconx.ca>
Wed, 4 Jan 2023 03:03:43 +0000 (22:03 -0500)
commitb84052135e522d00278d33e0b3d0afbb46e03f51
tree9d289a88d06da4695b7df64113082343c33c533d
parentccd4df684019395c163eb3174c5e8bf2d3d8bdfc
gen-strtab.awk: Work around parse issue on HP-UX 11.

HP-UX 11 awk seems to have some issues parsing ! in expressions.
For example:

  % awk 'BEGIN { print 1 + !0 }'
  syntax error The source line is 1.
  The error context is
BEGIN { print 1 + >>>  ! <<< 0 }
  awk: The statement cannot be correctly parsed.
  The source line is 1.

Adding parentheses appers sufficient to avoid the problem:

  % awk 'BEGIN { print 1 + (!0) }'
  2
scripts/gen-strtab.awk