ref: 66b39b58b8cda3e3c3a86c23401cad0e670a3432
parent: b02b5fd160095f12c706e8b731bcc1feb6855d58
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Fri Jul 1 14:39:03 EDT 2022
as: Initialize nvar variable Non initialized variables in awk have the empty string value, that when it is used in a numerical context is evaluated to 0, but it is still evaluated to "" in the context of an array index. Nvar was used later to run over the arrays but 0 didn't have any content in the arrays because nvar evaluated to "" in the first iteration.
--- a/src/cmd/as/mktbl.awk
+++ b/src/cmd/as/mktbl.awk
@@ -1,5 +1,6 @@
BEGIN {
+ nvar=0
printf "#include <scc/scc.h>\n"\
"#include \"../../as.h\"\n"\
"#include \"../" family "/proc.h\"\n"