Article View: news.software.readers
Article #230667Why plonk someone because you can't hide sigs ?
From: Jeff▲Relf
Date: Thu, 26 Feb 2009 08:47
Date: Thu, 26 Feb 2009 08:47
155 lines
6518 bytes
6518 bytes
Why plonk someone because you can't hide sigs ?
Like a lot of people, I only see sigs when I want to see them.
Even people who quote long sigs don't bother me because
I muffle blocks of >quoted lines, showing only the last two lines.
( >quoted blank lines don't count )
By the way, I see the file-system-like “ path ”
at the top of each post, like this:
Chris P. Bacon news:slrngqbeqt.hp0.cpb@jtlinux01.no-domain-set.aliant
Sidney Lambe news:errh76xvhh.ln2@magick.net
So, for me, attribution lines at the start of posts are redundant
and I kill them out-right.
Killing them is very simple to do ..
I know lines at the start of a post are attribution lines
when they're followed by a >quoted line or a <Snip> line
( or followed by a blank line and then a >quoted line )
>From JeffRelf.F-M.FM/X.CPP:
#define > ( Ch == '>' )
#define isQL ( \
> \
|| ( Ch == '<' || Ch == '[' ) \
&& ( EqiN( P+1, L"Snip", 4 ) || EqiN( P+1, L"...", 3 ) ) )
const int _HTML = 2, Filtered_ = 1 ;
Filter( int _Filtered, LnA BB, LnA EE ) {
LnA PP = BB - 1 ; LnP B, P ;
if ( ! _Filtered ) {
while ( ++ PP < EE && ( B = * PP ) )
// Print all lines, unFiltered.
Sh( L"%s", B );
return ; }
int NeedBB = 1 ;
Loop( 10 ) {
// Scanning through the first 10 lines of a post or eMail,
// looking for a good place to start printing lines.
if ( ++ PP >= EE || ! ( B = * PP ) ) break;
if ( NeedBB ) {
P = B ;
WhileWhite
// Skip past leading whiteSpace.
;
if ( ! Ch )
// The line was blank, get the next one.
continue ;
// Make BB point to the array of nonBlank lines
// to start the body of the post ( or eMail ).
BB = PP, NeedBB = 0 ; }
if ( EqN( B, L"-----BEGIN PGP", 14 ) ) {
// Xns9BB19489DD7E82362352@127.0.0.1
// Kill nonBlank lines.
while ( ++ PP < EE && ( B = * PP ) && ( Ch = * B ) );
// Kill Blank lines.
while ( ++ PP < EE && ( B = * PP ) && !( Ch = * B ) );
// Make BB point to the array of nonBlank lines
// to start the body of the post ( or eMail ).
BB = PP ; }
if ( EqN( B, L"--", 2 ) )
// Nothing but a sig !
break;
}
if ( NeedBB )
// No lines to print, we're done.
return ;
if ( _Filtered == _HTML || EqiN( B = * BB, L"<HTML", 5 )
|| EqiN( B, L"<!DOCTYPE", 9 ) || EqiN( B, L"<META", 5 ) )
// An HTML-only post or eMail, very rare these days.
goto HTML_Only ;
if ( MimeHeader )
// Handle the MINE attachment, see X.CPP.
goto Attach ;
MimeSep = 0 ;
// 1c54b35eae63492f355dfdd8d0274b21np@mypost.invalid
// slrngpbe5a.6v5.wookie@aces.localdomain
PP = BB - 1 ; const int MaxAttribLns = 5 ;
while ( ++ PP < EE && PP - BB <= MaxAttribLns
&& ( P = * PP ) && ( Ch = * P, Ch && !isQL ) )
// Checking for a block of nonBlank lines
// terminated by either a >quoted line ( or a <Snip> line )
// or a blank line followed by a >quoted line ( or <Snip> ).
;
if ( isQL || ++ PP < EE && ( P = * PP ) && ( Ch = * B, isQL ) )
// Make the post start here, on the ( soon-to-be-muffled )
// >quoted line or the <Snip> line, after the attribution lines.
BB = PP ;
PP = BB - 1 ; int Pgp = 0, wrpQL, QL = 0 ;
LnP prnQ1 = 0, prnQ2 = 0 ; const LnP ˄ = L"˄" ;
while ( ++ PP < EE && ( P = B = * PP ) ) {
// Scan though each line of the body, selectively printing.
wrpQL = QL ;
if ( Ch = * B, QL = isQL ) {
// This is a >quoted line or a <Snip...> line.
if ( !prnQ2 )
// Remember a dummy ˄line,
// in case only blank lines were quoted.
prnQ2 = ˄ ;
P = B ;
While( Ch <= 32 || > )
// Skip past leading >chars and whitepace
;
// Ch is null when a blank line was >quoted.
if (
Ch
&& !( isQL || EqiN( P, L"- Show q", 8 )
|| EqiN( P, L"- Hide q", 8 ) ) )
// Something “ good ” was >quoted,
// remember the last two of these.
prnQ1 = prnQ2, prnQ2 = B ;
// Don't print it, not yet.
continue ; }
if ( *B == '-' ) {
if ( B[1] == '-' && ( ! B[2] || B[2] == 32 && ! B[3] ) )
// a “ --␣ ” or “ -- ” sigLine, we're done.
return ;
if ( Eq( B + 1, L" -- " ) )
// a “ -␣--␣ ”sigLine, we're done printing.
return ; }
if ( EqN( B, L"-----BEGIN PGP SIGNA", 20 ) ) {
Pgp = 1 ; continue ; }
if ( Pgp ) {
if ( EqN( B, L"-----END PGP", 12 ) ) {
Pgp = 0 ; Sh( L"_PGP_Killed_" ); } continue ; }
if ( wrpQL && 1 + PP < EE
&& ( P = PP[1] ) && ( Ch = * P, > ) )
// False alarm, this line is a spilt-over >quoted line
// ( from wrapping ) ― ignore it.
continue ;
// A line of original content ! print it ..
// and ( up-to ) two >quoted lines as well.
if ( prnQ2 ) {
// >quoted line(s) preceeded original content.
if ( prnQ1 && prnQ1 != ˄ )
// Print the second-to-last >quoted line of the block.
Sh( L"%s", prnQ1 );
// Print the last >quoted line of the block
Sh( L"%s", prnQ2 ), prnQ1 = prnQ2 = 0 ; }
// Print the line of original content.
Sh( L"%s", B ); } return ;
...
Technical Details
Message-ID:
<Jeff_Relf@Seattle.2009_Feb.26|0.47am|O>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mailReferences:
<slrngqbeqt.hp0.cpb@jtlinux01.no-domain-set.aliant> <errh76xvhh.ln2@magick.net>Show Full Headers
Complete Article Headers
Message-ID: <Jeff_Relf@Seattle.2009_Feb.26|0.47am|O> Subject: Why plonk someone because you can't hide sigs ? Date: Thu, 26 Feb 2009 08:47:19 +0000 From: Jeff▲Relf <Jeff_Relf@Seattle.TEST> References: <slrngqbeqt.hp0.cpb@jtlinux01.no-domain-set.aliant> <errh76xvhh.ln2@magick.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Newsgroups: news.software.readers Lines: 155 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net N6jaHHRCC68tHJ7e/+OhKgC2a8wWaMvNV+P2qNlySGzcwqlgZx Cancel-Lock: sha1:UWrK+GDg3P+F3ezpOM7iOqzmoyg= User-Agent: JeffRelf.F-M.FM/X.ZIP X-Original-Bytes: 6283