Skip to content

Commit c25d86c

Browse files
committed
support/gen-debug-trace-error-codes.sh: tweak for compatibility with mawk.
1 parent a75d520 commit c25d86c

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

support/gen-debug-trace-error-codes.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@ BEGIN {
1212
print("#undef WOLFSSL_DEBUG_TRACE_ERROR_CODES_H") >> "wolfssl/debug-untrace-error-codes.h";
1313
}
1414
{
15-
if (match($0, "^[[:space:]]+([A-Z][A-Z0-9_]+)[[:space:]]*=[[:space:]]*(-[0-9]+)[,[:space:]]", errcode_a)) {
15+
if (match($0, "^[[:space:]]+([A-Z][A-Z0-9_]+)[[:space:]]*=[[:space:]]*(-[0-9]+)[,[:space:]]")) {
16+
17+
# for mawkward compatibility -- gawk allows errcode_a as the 3rd arg to match().
18+
gsub("^[[:space:]]+", "", $0);
19+
split($0, errcode_a, "[[:space:]=,]+");
20+
1621
if ((errcode_a[1] == "MIN_CODE_E") ||
1722
(errcode_a[1] == "WC_LAST_E") ||
1823
(errcode_a[1] == "MAX_CODE_E"))

0 commit comments

Comments
 (0)