From: Paul Hänsch Date: Tue, 10 Dec 2019 11:23:58 +0000 (+0100) Subject: suppress error for non-numerig comparisons X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=ed436baad43d9eed7744ab0c95563359f37e67ca;p=lobster suppress error for non-numerig comparisons --- diff --git a/index.cgi b/index.cgi index ef9c747..d4e3cb9 100755 --- a/index.cgi +++ b/index.cgi @@ -18,8 +18,16 @@ ACTION="$(GET a)" message="$(COOKIE message)" [ "$message" ] && SET_COOKIE 0 message='' -checked(){ [ "$1" = "$2" ] || [ "$1" -eq "$2" ] && printf 'checked="checked"' 2>/dev/null; } -selected(){ [ "$1" = "$2" ] || [ "$1" -eq "$2" ] && printf 'selected="selected"' 2>/dev/null; } +checked(){ + if [ "$1" = "$2" ] || [ "$1" -eq "$2" ]; then + printf 'checked="checked"' + fi 2>/dev/null +} +selected(){ + if [ "$1" = "$2" ] || [ "$1" -eq "$2" ]; then + printf 'selected="selected"' + fi 2>/dev/null +} yield_page() { local class="$1" style="$2"