Re: [JR] Lou Gehrig's disease?




Relf wrote:

<quote>
I've been a regular poster to Usenet since 1991,
I'm not sure if I ever quoted lines using the “ > ” character.
My posts remain unblocked everywhere, all the time.

Killing all >quoted lines is easy, and
the “ ⏎. ” prefix in front of the original content
tells me that >quoted lines were killed. I love it ! ( so far )

Killing “ attribution Lines ” ( ALs ) is tricky.

If there are blank lines at the start of a post, they are removed.
The span of lines ( up to 5 lines ) from there to the next blank line,
or to >quoted line, may or may not be ALs.

If the span of lines ends in a >quoted line,
then X.EXE considers them ALs and remove them ( by not printing them ).

But, if they end in a blank line, then they are ALs
if-and-only-if they contain something like “ Left@Right. ”
and the begining of the line doesn't look like a link
( e.g. “ news:Left@xxxxxxxxx ” ).

The code ( from JeffRelf.F-M.FM/X.CPP ) looks like this:
// BB points to the body, an array of lines.
// P and B will point to the line ( a null terminated string )

PP = BB - 1 ; int SawQ = 0, Smelly = 0 ; const int MaxAttribLns = 5 ;
while ( ++ PP < EE && PP - BB <= MaxAttribLns && ( P = B = * PP ) ) {
WhileWhite;
// Ch is either null or the first black space in the line.
if ( >Quoted || Smelly && ! Ch ) {
// Make the body of the post start after the ALs.
BB = PP + 1, SawQ = 1 ; break ; }
if ( ! Ch )
// “ ! Ch ” is true so the line is blank, we're done.
// We found no ALs.
break ;

if ( Smelly || EqiN( L"news:";, P, 5 ) || EqiN( L"Google.COM", P, 10 )
|| EqiN( L"www.", P, 4 ) || EqiN( L"http:", P, 5 ) )
// This line starts like it's a link, so ignore it.
continue ;

P = FromStart( P, '@' );
if ( ! P || P == B || ! Iden( P[ -1 ] ) || ! Iden( P[ 1 ] ) )
// No “ Left@Right ”, ignore the line.
continue ;

// “ ill ” has the “ . ” char and
// the list of invalid characters for a Right-ID

static LnP ill = L"@.,:;\"()<>[]\\"; P ++ ;
While( Ch > 32 && Ch < 127 ) {

// We're here while Right-ID has U.S. ASCII black space
LnP Svd = P ; int C = Ch ; P = ill ; While( C != Ch );

if ( Ch == '.' )
// Found the “ Left@Right. ”, we're in “ Smelly ” ALs.
Smelly = 1 ;

int Done = Ch ; P = Svd, Ch = 1 ; if ( Done ) break ; } }
.......

inline int Iden( wchar_t C ) {
return C == '_' || C >= 128 || Alpha_Numeric ( C ); }

#define >Quoted ( Ch == '>' || Ch == '|' )
#define EqiN ! wcsnicmp

#define While( Should_Loop ) Ch = 1 , P -- ; \
while ( Ch && ( Ch = * ++ P, Ch2 = ! Ch ? 0 : P[ 1 ], Should_Loop ) )

#define WhileWhite While ( Ch && ( Ch <= 32 || Ch == L'¸' ) )
</quote>

Thanks ever so much for explaining all that, Relf. I hope by quoting
it without the ">" characters you dislike, I've made it easier to read
your very important code snippet in the quoted text. I guess it could
be useful to any coders who haven't added the ability to hide quoted
text to their readers. (Though the only ones I can think of are MS
products and Thunderbird, which has an extension for it.)

Oh, and I think you'll find you *are* blocked quite a bit, but don't
let that bug you; Google Groups, the "gold standard" for Usenet, still
shows your posts to its iPhone users, which should be good enough.

--
»Q«
Kleeneness is next to Gödelness.

.