]> git.plutz.net Git - webpoll/blobdiff - widgets.sh
Merge commit '8b6e0d65db876fa09495399f66293860347e9605'
[webpoll] / widgets.sh
index ab88b3ec699319238b3db7452839d15fc8b2139b..835e6463113dae536546a0124d96855f56763e75 100755 (executable)
@@ -1,5 +1,20 @@
 #!/bin/sh
 
+export MD_HTML="false"
+if [ "$(which awk)" ]; then
+  markdown() { awk -f "$_EXEC/cgilite/markdown.awk"; }
+else
+  markdown() { busybox awk -f "$_EXEC/cgilite/markdown.awk"; }
+fi
+
+dec(){
+  local n
+  for n in "$@"; do
+    while [ "${n}" != "${n#0}" ]; do n="${n#0}"; done
+    printf %i\\n "$n"
+  done
+}
+
 checked(){
   local check="$1"; shift 1;
   for comp in "$@"; do