summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2017-08-30 11:51:55 -0700
committerOri Bernstein <ori@zomg.markovcorp.com>2017-08-30 11:52:30 -0700
commit0e0c0dd693efa98ae87f8a9f266b67e4f8625521 (patch)
tree083db1a7ba017fc04d848933d0a56e8d95effed7
parent9ee26ff98bb21a49d0b644cfa4ce6e999ade885c (diff)
download6as-0e0c0dd693efa98ae87f8a9f266b67e4f8625521.tar.gz
Clean up awk (thanks k0ga)
-rw-r--r--gen.awk9
1 files changed, 5 insertions, 4 deletions
diff --git a/gen.awk b/gen.awk
index eb0a735..a7d9628 100644
--- a/gen.awk
+++ b/gen.awk
@@ -19,15 +19,16 @@ $4 == "ignore" {next}
flags = flags "|" cur
}
+ gsub(/[ \t]*/, "", $2)
gsub(/:/, " | Argflagcolon,", $2)
split($2, a, ",")
for (i in a) {
if (a[i] == "void")
continue;
- gsub(/\|[ \t]*near/, " | Argflagnear", a[i])
- gsub(/\|[ \t]*far/, " | Argflagfar", a[i])
- gsub(/\|[ \t]*to/, " | Argflagto", a[i])
- gsub(/\|[ \t]*short/, " | Argflagshort", a[i])
+ gsub(/\|near/, " | Argflagnear", a[i])
+ gsub(/\|far/, " | Argflagfar", a[i])
+ gsub(/\|to/, " | Argflagto", a[i])
+ gsub(/\|short/, " | Argflagshort", a[i])
gsub(/\*/, "", a[i])
gsub(/^mem_offs$/, "memoff", a[i])