mirror of
https://forge.sourceware.org/marek/gcc.git
synced 2026-02-22 03:47:02 -05:00
a68: avoid conditional expression in sppp.awk
The macOS awk seems to not like having an unparenthesized conditional expression as the last argument to printf. This commit workarounds this by simply replacing the conditional expression with a conditional statement. Tested with gawk and mawk. Signed-off-by: Jose E. Marchesi <jemarch@gnu.org> libga68/ChangeLog * sppp.awk: Avoid conditional expression.
This commit is contained in:
@@ -114,7 +114,11 @@ BEGIN {
|
||||
{
|
||||
while (sub ("\\{" iter_name "\\}", iterators[iter_name,nalt], output)) {}
|
||||
}
|
||||
printf "%s%s\n", substr (output, 0, length(output) - 1), nalt < num_alternatives ? separator : ""
|
||||
if (nalt < num_alternatives)
|
||||
sep = separator
|
||||
else
|
||||
sep = ""
|
||||
printf "%s%s\n", substr (output, 0, length(output) - 1), sep
|
||||
}
|
||||
|
||||
for (key in iter_names) delete iter_names[key]
|
||||
|
||||
Reference in New Issue
Block a user