Drop undocumented special conditional syntax from %{load:...} builtin

%{load:...} supported strange conditional syntaxes that conflict
with general macro syntax. Drop support for these undocumented
variants, people can use %{exists:...} to test for file existence
before trying to load a macro file.
This commit is contained in:
Panu Matilainen 2020-11-04 10:55:41 +02:00
parent 7b25e19803
commit f955bc69d0
1 changed files with 1 additions and 2 deletions

View File

@ -1301,8 +1301,7 @@ static void doLoad(MacroBuf mb, int chkexist, int negate,
{
char *arg = NULL;
if (g && gn > 0 && expandThis(mb, g, gn, &arg) == 0) {
/* Print failure iff %{load:...} or %{!?load:...} */
if (loadMacroFile(mb->mc, arg) && chkexist == negate) {
if (loadMacroFile(mb->mc, arg)) {
mbErr(mb, 1, _("failed to load macro file %s\n"), arg);
}
}