From d9ca4265ef58d58d1068b67cec445f7baec80528 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Mon, 14 Sep 2026 11:41:03 +0100 Subject: [PATCH] mk: remove xprintf totally useless function. all it does is print quotes. just printf the args into awk this does literally the same thing. the output will literally be the same. unclear thinking == unclear code right thinking == this patch Signed-off-by: Leah Rowe --- mk | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/mk b/mk index cfadf915..bddf319e 100755 --- a/mk +++ b/mk @@ -50,7 +50,8 @@ err() elif [ $# -gt 1 ]; then printf "ERROR %s: %s: in command with args: " "$0" "$1" 1>&2 shift 1 - xprintf "$@" 1>&2 + printf '%s\n' "$@" | awk '{printf "\"%s\" ", $0}' + printf "\n" else printf "ERROR, but no arguments provided to err\n" 1>&2 fi @@ -58,21 +59,6 @@ err() exit 1 } -xprintf() -{ - xprintfargs=0 - while [ $# -gt 0 ]; do - printf "\"%s\"" "$1" - [ $# -gt 1 ] && \ - printf " " - - xprintfargs=1 - shift 1 - done - [ $xprintfargs -gt 0 ] && \ - printf "\n"; : -} - ( xbarg0="$0" [ "${xbarg0##*/}" = "$xbarg0" ] && \