Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
calendar: fix error with non-gnu awk
Use the POSIX-specified function Awk keyword instead of the non-standard func to define the prepare function in the text/calendar filter. The GNU Awk manual[1] mentions that gawk supports abbreviating function to func, but recommends against using the func abbreviation, as POSIX only specifies function. On my system (Debian sid), gawk isn't installed and mawk (Debian priority "required", i.e. installed by default) provides /usr/bin/awk instead. mawk appears to not support the abbreviated func keyword. When viewing a text/calendar part, I only see the following: awk: /usr/libexec/aerc/filters/calendar: line 211: return outside function body Using the standardized function keyword allows mawk to parse the prepare function (including its return) and execute the script as intended. [1]: https://www.gnu.org/software/gawk/manual/html_node/Definition-Syntax.html (section 9.2.1 "Function Definition Syntax") Fixes: 0db924d ("filters: fix calendar filter parsing") Changelog-fixed: Builtin `calendar` filter error with non-GNU Awk. Signed-off-by: Timon Reinold <[email protected]> Acked-by: Robin Jarry <[email protected]>
- Loading branch information