Skip to content

Commit

Permalink
support/gen-debug-trace-error-codes.sh: tweak for compatibility with …
Browse files Browse the repository at this point in the history
…mawk.
  • Loading branch information
douzzer committed Aug 8, 2024
1 parent a75d520 commit c25d86c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion support/gen-debug-trace-error-codes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ BEGIN {
print("#undef WOLFSSL_DEBUG_TRACE_ERROR_CODES_H") >> "wolfssl/debug-untrace-error-codes.h";
}
{
if (match($0, "^[[:space:]]+([A-Z][A-Z0-9_]+)[[:space:]]*=[[:space:]]*(-[0-9]+)[,[:space:]]", errcode_a)) {
if (match($0, "^[[:space:]]+([A-Z][A-Z0-9_]+)[[:space:]]*=[[:space:]]*(-[0-9]+)[,[:space:]]")) {
# for mawkward compatibility -- gawk allows errcode_a as the 3rd arg to match().
gsub("^[[:space:]]+", "", $0);
split($0, errcode_a, "[[:space:]=,]+");
if ((errcode_a[1] == "MIN_CODE_E") ||
(errcode_a[1] == "WC_LAST_E") ||
(errcode_a[1] == "MAX_CODE_E"))
Expand Down

0 comments on commit c25d86c

Please sign in to comment.