From: Nick Bowler Date: Fri, 18 Feb 2022 22:15:34 +0000 (-0500) Subject: Fix gen-typegen.awk incompatibility with busybox awk. X-Git-Tag: v1.2~4 X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/commitdiff_plain/59c178a65021036c13ddd6bb2eaad18db071f4e9 Fix gen-typegen.awk incompatibility with busybox awk. It seems that busybox awk does not support * in printf conversions. There is only one use of this feature in the scripts and we can use the substr function instead. --- diff --git a/test/gen-typegen.awk b/test/gen-typegen.awk index 0ae20f5..a3a1527 100755 --- a/test/gen-typegen.awk +++ b/test/gen-typegen.awk @@ -1,6 +1,6 @@ #!/bin/awk -f # -# Copyright © 2021 Nick Bowler +# Copyright © 2021-2022 Nick Bowler # # Generate a mapping from a (random) integer to a list of type specifiers # represented by struct cdecl_declspec. Used internally by declgen to @@ -53,7 +53,7 @@ END { printf "\t\t%6s gen_raw_typespec_(%s,\n", prefix, $j } - printf "\t\t%25sNULL%.*s;\n", "", NF, "))))))))" + printf "\t\t%25sNULL%s;\n", "", substr("))))))))", 1, NF); } print "\tdefault:\n\t\tassert(0);\n\t}" print "}\n"