Re: RFC2369 bug (was
Harvey Eneman <[email protected]>
| Newsgroups | gmane.mail.exmh.user |
|---|---|
| Message-ID | <[email protected]> |
Please evaluate the attached patch for support of rfc2369 and its future extension guidelines. Note: I also found that the previous "List" menu was not being entirely cleared. Harv _______________________________________________ Exmh-users mailing list [email protected] https://www.redhat.com/mailman/listinfo/exmh-users
msgShow.tcl.patch
(application/x-patch, 2.2 KB)
*** msgShow.tcl.orig 2010-08-27 01:34:46.000000000 -0700
--- msgShow.tcl 2010-08-27 01:49:12.000000000 -0700
***************
*** 254,274 ****
foreach index [array names header 0=1,hdr,list-*] {
# Get the suffix portion of the header name
regsub {^.*,list-} $index {} name
! # Remove comments
! regsub -all {\([^()]*\)} $header($index) {} h
! # Remove whitespace
! regsub -all "\[ \n\t\]" $h {} h
! # Loop through the fields
! foreach f [split $h ,] {
! # Stricture #1
! if {[string index $f 0] == "<"} {
! # Stricture #2
! regexp "<(.*)>" $f match url
! regexp {^([^:]*)} $url match proto
! lappend menuitems $name $proto $url
! } else {
# Stricture #3
! break
}
}
}
--- 254,278 ----
foreach index [array names header 0=1,hdr,list-*] {
# Get the suffix portion of the header name
regsub {^.*,list-} $index {} name
! # Stricture #1
! # Remove leading white space and comments
! regsub {^[ \n\t]*(\([^)]*\)[ \n\t]*)*} $header($index) {} h
! if {[string index $h 0] == "<"} {
! # Loop through the fields
! while {[regexp -indices {<([^>]*)>} $h match i]} {
! set url [eval {string range $h} $i]
# Stricture #3
! if [regexp {^([^:]*):} $url -> proto] {
! lappend menuitems $name $proto $url
! }
! set next [expr [lindex $match 1]+1]
! set h [string range $h $next end]
! # Stricture #2
! regsub {^[ \n\t]*(\([^)]*\)[ \n\t]*)*} $h {} h
! if {[string index $h 0] != ","} {
! break
! }
! regsub {^[ \n\t]*(\([^)]*\)[ \n\t]*)*} $h {} h
}
}
}
***************
*** 278,284 ****
} else {
set menu [Widget_AddMenuB $exwin(mopButtons) list "List" {right padx 1 filly}]
}
! $exwin(mopButtons).list.m delete 1 99
foreach {name proto url} $menuitems {
Widget_AddMenuItem $menu "$name ($proto)" [list URI_StartViewer $url]
}
--- 282,288 ----
} else {
set menu [Widget_AddMenuB $exwin(mopButtons) list "List" {right padx 1 filly}]
}
! $exwin(mopButtons).list.m delete 0 99
foreach {name proto url} $menuitems {
Widget_AddMenuItem $menu "$name ($proto)" [list URI_StartViewer $url]
}
signature.asc
(application/pgp-signature, 225 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) Comment: Exmh version 2.7.2 01/07/2005 iD8DBQFMd34UJWLrSYxEfJMRArwSAKCUQhV8zx8JCqGhzs08xlih5j7BBACgn/sF 0BaOWsU0shuLR9Qi7cE+vaY= =8GNP -----END PGP SIGNATURE-----