📄 00000003.htm
字号:
return <BR> } <BR> set pop3_mail [lindex $pop3_buff 1] <BR> set pop3_retr 1 <BR> if {$pop3_retr > $pop3_mail} { <BR> pop3Send "QUIT" <BR> set pop3_stat quit_result <BR> return <BR> } <BR> pop3Send "RETR $pop3_retr" <BR> set pop3_stat retr_result <BR> } <BR> retr_result { <BR> if [string compare [lindex $pop3_buff 0] "+OK"] { <BR> pop3Error <BR> return <BR> } <BR> set pop3_stat retr_context <BR> set pop3_line 0 <BR> } <BR> retr_context { <BR> if {[string compare $pop3_buff "."] != 0} { <BR> # puts "NOT EOF" <BR> return <BR> } <BR> incr pop3_retr <BR> if {$pop3_retr > $pop3_mail} { <BR> pop3Send "QUIT" <BR> set pop3_stat quit_result <BR> return <BR> } <BR> pop3Send "RETR $pop3_retr" <BR> set pop3_stat retr_result <BR> } <BR> quit_resut { <BR> if [string compare [lindex $pop3_buff 0] "+OK"] { <BR> pop3Error <BR> return <BR> } <BR> } <BR> default {} <BR> } <BR>} <BR> <BR>proc pop3Open {} { <BR> global hostname portname username password <BR> global pop3_sock pop3_stat pop3_list pop3_line <BR> if {[catch {socket $hostname $portname} pop3_sock]!=0} { <BR> tk_dialog .errorMsg "ERROR MESSAGE" $pop3_sock question 0 OK <BR> return <BR> } <BR> # puts "After socket command" <BR> # fconfigure $pop3_sock -blocking false <BR> <BR> set pop3_stat send_user <BR> set pop3_list 0 <BR> set pop3_line 0 <BR> fileevent $pop3_sock readable "pop3Read" <BR>} <BR> <BR>frame .buttons -bd 2 <BR> <BR>button .buttons.fingerOpen -font 10x20 -text fingerOpen \ <BR> -command { <BR> set portname "finger" <BR> fingerOpen <BR> } <BR>pack .buttons.fingerOpen -side left -expand 1 <BR> <BR>button .buttons.pop3Open -font 10x20 -text pop3Open \ <BR> -command { <BR> set portname "pop-3" <BR> pop3Open <BR> } <BR>pack .buttons.pop3Open -side left -expand 1 <BR> <BR>pack .buttons -side bottom -fill x -pady 2m <BR> <BR>foreach i {.f1 .f2 .f3} { <BR> frame $i -bd 2 <BR> label $i.label -font 10x20 <BR> entry $i.entry -font 10x20 -width 32 -relief sunken <BR> bind $i.entry <Return> { <BR> if {[string compare $portname "pop-3"] == 0} { <BR> pop3Open <BR> } else { <BR> set portname "finger" <BR> fingerOpen <BR> } <BR> } <BR> pack $i.label -side left <BR> pack $i.entry -side right <BR>} <BR> <BR>..f1.label configure -text "Host:" <BR>..f1.entry configure -textvariable hostname <BR>set hostname bbs.ntu.edu.tw <BR> <BR># .f2.label configure -text "Port:" <BR># .f2.entry configure -textvariable portname <BR>set portname finger <BR> <BR>..f2.label configure -text "User:" <BR>..f2.entry configure -textvariable username <BR>set username Mephis.bbs <BR> <BR>..f3.label configure -text "Pass:" <BR>..f3.entry configure -textvariable password -show "*" <BR>set password secret <BR> <BR>pack .f1 .f2 .f3 -side top -fill x -padx 1m -pady 2m <BR>focus .f1.entry <BR> <BR>-- <BR>※ 来源:·BBS 水木清华站 bbs.net.tsinghua.edu.cn·[FROM: 162.105.170.135] <BR><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -