]> git.draconx.ca Git - dxcommon.git/commitdiff
gen-options.awk: Don't pass ERE to split().
authorNick Bowler <nbowler@draconx.ca>
Sun, 3 Dec 2023 05:52:53 +0000 (00:52 -0500)
committerNick Bowler <nbowler@draconx.ca>
Sun, 3 Dec 2023 06:07:52 +0000 (01:07 -0500)
Strange behaviour is observed on ULTRIX 4.5 nawk when passing a
literal ERE as the fs argument to the split function.  There is
no problem passing an equivalent string instead.

scripts/gen-options.awk

index 98b7c17119988438797bddfc3ae5963357abf174..450f85c3713f5aeeea09d93f89aa7acedb10ace7 100755 (executable)
@@ -181,7 +181,7 @@ $0 ~ /^-/ {
     # packed form is not possible w/ actions
     has_actions = 1;
 
-    n = split(work, a, /,[ \t]*/)
+    n = split(work, a, ",[ \t]*")
     if (n == 2) {
       flag = substr(a[1], 2) ", " substr(a[2], 1, length(a[2])-1)
     } else if (n == 1) {