diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-06-03 01:28:18 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-06-03 01:28:18 +1200 |
commit | 95a79bb97af9998cf3416f62f6f0f6dfcad2fb1d (patch) | |
tree | e2e34d59e5344e13a6a44b9684245c7e4b017078 | |
parent | Nicer toggle (diff) | |
download | dotfiles-95a79bb97af9998cf3416f62f6f0f6dfcad2fb1d.tar.gz dotfiles-95a79bb97af9998cf3416f62f6f0f6dfcad2fb1d.zip |
Use full length($0) rather than just length
The latter is allowed by POSIX, but not historically accepted everywhere
and the former being explicit is more readable anyway
-rw-r--r-- | bin/unf.awk | 2 | ||||
-rw-r--r-- | games/squ.awk | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/bin/unf.awk b/bin/unf.awk index a9837a8a..ac6172f7 100644 --- a/bin/unf.awk +++ b/bin/unf.awk @@ -8,7 +8,7 @@ function wrbuf() { } # Flag to stop processing once we hit the first blank line -!length { +!length($0) { wrbuf() body = 1 } diff --git a/games/squ.awk b/games/squ.awk index abd16934..be72a3b6 100644 --- a/games/squ.awk +++ b/games/squ.awk @@ -1,5 +1,5 @@ # Make a reduced Latin square out of each line of input -l = length { +l = length($0) { str = toupper($0) for (j = 0; j < l; j++) for (k = 0; k < l; k++) |