patch dc30edb7135409c41683a29f0a23684e7805693c
Author: Enrique D. Bosch <presidev@AT@gmail.com>
Date: Sun Sep 2 19:44:50 CEST 2018
* Use defaulted argument in imap_command_tagged function, ifempty function not necessary
diff -rN -u old-idlebiff/idlebiff new-idlebiff/idlebiff
--- old-idlebiff/idlebiff 2024-11-22 16:17:57.069128947 +0100
+++ new-idlebiff/idlebiff 2024-11-22 16:17:57.069128947 +0100
@@ -30,7 +30,6 @@
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 } { if {[ eq $str {} ]} { return $alt } else { return $str } }
proc check_conf_and_set_default { opt default } \
{
@@ -288,12 +287,12 @@
set_timeout
}
-proc imap_command_tagged { con com args } \
+proc imap_command_tagged { con com { prefix A } } \
{
variable ::static::tag
if {[ == $tag 10000 ]} { set tag 1 }
- append tcom [ ifempty $args A ] [ format %04d $tag ] { } $com
+ append tcom $prefix [ format %04d $tag ] { } $com
imap_command $con $tcom
incr tag
}