emission = substr($0, i + 6, RLENGTH - 7);
consumeUntil = "END(" emission ")";
emissionHandled = 0;
+}
+
+# Most lines just get copied from the source as-is, including the start
+# comment for directives.
+{
print;
}
}
}
-#
-# General control (must appear after the directives).
-#
-
-# Handle the end of directive processing.
+# Handle the end of directive processing (must appear after the directive
+# clauses).
emission != "" {
if (!emissionHandled) {
printf("WARNING: unknown tag \"%s\"\n", emission) >"/dev/stderr";
}
emission = "";
- next;
}
-# Most lines just get copied from the source as-is.
-{ print; }
-
#
# Helper functions.
#
# Calculate derived values.
constName[idx] = toupper(name[idx]);
- gsub("[---/]", "_", constName[idx]); # Dash and slash become underscore.
+ gsub("[/-]", "_", constName[idx]); # Dash and slash become underscore.
gsub("[+^]", "", constName[idx]); # Plus and caret are removed.
split(name[idx], parts, "/");