Article View: news.software.readers
Article #240286--
From: Unknown
Date: Sun, 04 Apr 2010 12:26
Date: Sun, 04 Apr 2010 12:26
60 lines
3409 bytes
3409 bytes
ďťż
Nice to meet you, Patrickâ˘Lamaizière,
you must be the dude who e¡mailed X.CPP all over the place.
Did you enjoy this ( from http://jeffrelf.f-m.fm/X.CPP ) ? :
#define szStr wcslen
// Given the Beginning of a string (âBâ), run a pointer (âPâ)
// backwards ( from E to B ) while âShould_Loopâ is true.
// â!Châ is true if P has run past B ( going backwards ).
#define WhileBac( Should_Loop ) \
Ch = Ch2 = 0; if ( !E ) E = B + szStr( B ); P = E ; \
while ( P >= B && \
( Ch2 = *P, ( Ch = --P < B ? 0 : *P ) && ( Should_Loop ) ) )
typedef wchar_t *LnP ; int Ch, Ch2 ;
// g¡mID( B, P, E ) gets the last mID in the âReferences:â line.
// B points to the Beginning of data in the line.
// E points to the latter part of this line, at the end of an mID.
// P starts at E and gets moved one or two mID to the left,
// to the start of an mID.
int sz¡mID ;
int g¡mID( LnP B, LnP &P, LnP &E ) { int â°âą, cnt¡At ;
nx¡mID: cnt¡At = sz¡mID = 0 ;
WhileBac( Ch <= 32 || Ch == ',' );
if ( !Ch )
// No more MIDs on the line.
return 0 ;
E = P ;
if ( !( â°âą = Ch == '>' ) )
// Google Groups doesn't always <> bracket <m@ID>'s.
// 31749c8f-28b9-4ff6-91e7-a233b9dbaf9b@n39g2000prj.googlegroups.com
E++ ;
Join:
WhileBac( Ch > 32 && Ch != ',' && Ch != '<' )
if ( Ch == '@' )
// Count the â@â characters in the mID.
cnt¡At ++ ;
if ( â°âą && Ch != '<' ) {
// Remove newlines and spaces in the bracketted <m@ID>.
// Believe it or not, this actually happens ( Outlook ).
// ho62hl$ors$1@hvac.motzarella.org
LnP pBlack = P + 1, E¡ = E ; E = P ;
WhileBac( Ch <= 32 ); if ( !Ch ) return 0 ;
E = E¡, wmemmove( ++P, pBlack, E - pBlack ), E -= pBlack - P ;
// Get the rest of the bracketted <m@ID>.
goto Join ; }
if ( cnt¡At != 1 || ( sz¡mID = E - ++ P ) < 3 ) {
// Skip¡Over any mID that's under 3 characters long and/or
// doesn't have one¡and¡only¡one â@â character.
E = -- P ; goto nx¡mID ; }
return sz¡mID ; }
Technical Details
Message-ID:
<JeffRelf.F-M.FM.39@2010_Apr4.5.26am>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!nntp.giganews.com!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!198.186.194.249.MISMATCH!news-out.readnews.com!transit3.readnews.com!nx02.iad01.newshosting.com!newshosting.com!news.glorb.com!news-spur1.glorb.com!newsread.glorb.com!not-for-mailReferences:
<81mulkFp4jU1@mid.individual.net> <JeffRelf.F-M.FM.Wz@2010_Apr2.11.44pm> <hp9q0b$76f$1@news.davenulle.org>Show Full Headers
Complete Article Headers
Message-ID: <JeffRelf.F-M.FM.39@2010_Apr4.5.26am> Subject: -- Date: Sun, 04 Apr 2010 12:26:36 +0000 From: Unknown <anon@nohost.local> References: <81mulkFp4jU1@mid.individual.net> <JeffRelf.F-M.FM.Wz@2010_Apr2.11.44pm> <hp9q0b$76f$1@news.davenulle.org> 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!nntp.giganews.com!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!198.186.194.249.MISMATCH!news-out.readnews.com!transit3.readnews.com!nx02.iad01.newshosting.com!newshosting.com!news.glorb.com!news-spur1.glorb.com!newsread.glorb.com!not-for-mail Newsgroups: news.software.readers Organization: JeffRelf.F-M.FM Lines: 60 NNTP-Posting-Host: sG8gTG3mTSaPNwdJj6d6jg.981.posting.glorb.com Content-Type: Text/Plain; charset=UTF-8 X-Complaints-To: abuse@glorb.com NNTP-Posting-Date: Sun, 4 Apr 2010 12:26:38 +0000 (UTC) User-Agent: JeffRelf.F-M.FM/X.EXE X-Notice: Scanned by Mr. Bill