From decc304623484dba216bed0d1237686b803acea7 Mon Sep 17 00:00:00 2001 From: xonix Date: Thu, 19 Jan 2023 23:52:23 +0200 Subject: [PATCH] Parameterized goals #115 rfct --- makesure.awk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/makesure.awk b/makesure.awk index 91aac59..4155615 100755 --- a/makesure.awk +++ b/makesure.awk @@ -213,7 +213,7 @@ function handleGoal() { } function registerGoal(goalName, priv) { - if (length(goalName) == 0) + if (goalName == "") addError("Goal must have a name") if (goalName in GoalsByName) addError("Goal " quote2(goalName,1) " is already defined") @@ -409,7 +409,7 @@ body,goalBody,goalBodies,resolvedGoals,exitCode, t0,t1,t2, goalTimed, list) { body = trim(Code[goalName]) - emptyGoals[goalName] = length(body) == 0 + emptyGoals[goalName] = body == "" goalBody[0] = "" addLine(goalBody, preludeCode)