Strip unused braces and lines
patch 734e04efcdbee633dd1621cd32d7327e62819e6c
Author: Enrique D. Bosch <presidev@AT@gmail.com>
Date: Wed Jun 8 11:34:39 CEST 2016
* Strip unused braces and lines
diff -rN -u old-idlebiff/idlebiff new-idlebiff/idlebiff
--- old-idlebiff/idlebiff 2024-11-22 16:31:45.975783147 +0100
+++ new-idlebiff/idlebiff 2024-11-22 16:31:45.975783147 +0100
@@ -90,7 +90,7 @@
set png_chk_h [ dict get $pnginfo height ]
set size_not_same [ expr $png_up_w!=$png_down_w || $png_down_w!=$png_chk_w || $png_up_h!=$png_down_h || $png_down_h!=$png_chk_h ]
- if { $size_not_same } { error }
+ if $size_not_same { error }
wm title . idlebiff
wm iconname . idlebiff
@@ -114,11 +114,9 @@
bind .frame.canvas.button <Button-1> force_down
bind .frame.canvas.button <Button-2> { cleanup $con }
bind .frame.canvas.button <Button-3> { idle_cycle $con 1 }
-# if { $conf(tip) } { tooltip::tooltip .frame.canvas }
-# set current $img_chk
}
-proc get_password { bad } \
+proc get_password bad \
{
variable ::shared::conf
upvar #0 pass pass
@@ -145,7 +143,7 @@
return $p
}
-proc update_img { img } \
+proc update_img img \
{
variable ::shared::conf
variable ::shared::new_messages
@@ -211,7 +209,7 @@
return $res
}
-proc recon { con } \
+proc recon con \
{
variable ::shared::ka
@@ -240,17 +238,17 @@
incr tag
}
-proc ok_tagged { linea } \
+proc ok_tagged linea \
{
return [ regexp -lineanchor -nocase {^A\d+\s+ok.*$} $linea ]
}
-proc ok_untagged { linea } \
+proc ok_untagged linea \
{
return [ regexp -lineanchor -nocase {^\*\s+ok.*$} $linea ]
}
-proc no_tagged { linea } \
+proc no_tagged linea \
{
return [ regexp -lineanchor -nocase {^A\d+\s+no.*$} $linea ]
}
@@ -268,13 +266,13 @@
imap_command_tagged $con "LOGIN $conf(user) $conf(pass)"
}
-proc logout { con } \
+proc logout con \
{
imap_command_tagged $con LOGOUT
close $con
}
-proc cleanup { con } \
+proc cleanup con \
{
logout $con
exit 0
@@ -287,29 +285,29 @@
update_img $img_down
}
-proc enter_idle { con } \
+proc enter_idle con \
{
imap_command_tagged $con IDLE
}
-proc exit_idle { con } \
+proc exit_idle con \
{
imap_command $con DONE
}
-proc enter_mailbox { con } \
+proc enter_mailbox con \
{
variable ::shared::conf
imap_command_tagged $con "EXAMINE $conf(mailbox)"
}
-proc exit_mailbox { con } \
+proc exit_mailbox con \
{
imap_command_tagged $con CLOSE
}
-proc ask_unseen { con } \
+proc ask_unseen con \
{
variable ::shared::cap
@@ -342,7 +340,7 @@
set ka [ after ${conf(keepalive)}000 { idle_cycle $con 0 } ]
}
-proc init_idle { con } \
+proc init_idle con \
{
variable ::shared::conf
variable ::shared::ka
@@ -354,14 +352,14 @@
set ka [ after ${conf(keepalive)}000 { idle_cycle $con 0 } ]
}
-proc parse_greeting { con } \
+proc parse_greeting con \
{
set linea [ read_line $con ]
check_cap $linea logindisabled
if [ ok_untagged $linea ] { fileevent $con readable { parse_noop $con } }
}
-proc parse_noop { con } \
+proc parse_noop con \
{
set linea [ read_line $con ]
check_cap $linea logindisabled
@@ -372,7 +370,7 @@
}
}
-proc parse_login { con } \
+proc parse_login con \
{
variable ::shared::cap
@@ -391,7 +389,7 @@
elseif [ no_tagged $linea ] { login $con 1 }
}
-proc parse_cap { con } \
+proc parse_cap con \
{
variable ::shared::cap
@@ -405,7 +403,7 @@
}
}
-proc parse_idle_check { con } \
+proc parse_idle_check con \
{
variable ::shared::idle
@@ -416,7 +414,7 @@
else { parse_unseen $linea }
}
-proc parse_unseen { linea } \
+proc parse_unseen linea \
{
variable ::shared::conf
variable ::shared::img_up
@@ -437,7 +435,7 @@
}
}
-proc read_line { con } \
+proc read_line con \
{
cancel_timeout
if [ catch { set r [ gets $con line ] } ] \
@@ -457,7 +455,7 @@
else { return $line }
}
-proc parse_cert_subject { sub } \
+proc parse_cert_subject sub \
{
set cst [ split [ string map { , = / = } $sub ] = ]
foreach v $cst { lappend cstp [ string trim $v ] }