]> git.plutz.net Git - lobster/blobdiff - index.cgi
suppress error for non-numerig comparisons
[lobster] / index.cgi
index 43abf5ddcc288383965904aeb496eb5cd94e3a15..d4e3cb9c447d146b43dee193c743e28bdfb0913b 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
@@ -18,12 +18,23 @@ ACTION="$(GET a)"
 message="$(COOKIE message)"
 [ "$message" ] && SET_COOKIE 0 message=''
 
+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"
   printf 'Content-Type: text/html; charset=utf-8\r\n\r\n'
   { printf '
        [html [head
-          [title Confetti]
+          [title Lobster]
          [meta name="viewport" content="width=device-width"]
          [link rel="stylesheet" type="text/css" href="/style.css"]
     '