Simplify ifempty function
patch 1fa87126792bb5a286620f7604fe9c0affd81637
Author: Enrique D. Bosch <presidev@AT@gmail.com>
Date: Fri Aug 31 22:07:57 CEST 2018
* Simplify ifempty function
diff -rN -u old-idlebiff/idlebiff new-idlebiff/idlebiff
--- old-idlebiff/idlebiff 2024-11-22 16:28:27.268106573 +0100
+++ new-idlebiff/idlebiff 2024-11-22 16:28:27.272106567 +0100
@@ -30,10 +30,7 @@
proc or args { foreach x $args { if { $x } { return 1 } }; return 0 }
proc and args { foreach x $args { if { $x } continue { return 0 } }; return 1 }
-proc ifempty { str alt } \
-{
- return [ expr { [ eq $str {} ] ? $alt : $str } ]
-}
+proc ifempty { str alt } { if {[ eq $str {} ]} { return $alt } else { return $str } }
proc check_conf_and_set_default { opt default } \
{