Article View: news.software.readers
Article #240310--
From: Unknown
Date: Mon, 05 Apr 2010 19:00
Date: Mon, 05 Apr 2010 19:00
64 lines
3719 bytes
3719 bytes
ï»ż
<PRE>
I'm glad that you ( SteveâąFabian ) know how to display monospaced but
what about the MANY others ( e.g. Googlers ) who aren't so crafty ?
Without the < PRE> tag, most of them would see the following
in a proportional font:
[ from <A hRef="http://jeffrelf.f-m.fm/X.CPP">X.CPP, Micro·Soft Visual C++ 9.0</A> ]
#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.s5@2010_Apr5.0.00pm>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.os.msdos.4dos.mbox.zip!g2news1.google.com!news2.google.com!news.glorb.com!news-spur1.glorb.com!newsread.glorb.com!not-for-mailReferences:
<IU.D20100401.T124556.P4428.Q0@J.de.Boyne.Pollard.localhost> <hpci15$9hm$1@Kil-nws-1.UCIS.Dal.Ca> <JeffRelf.F-M.FM.UA@2010_Apr5.6.35am> <hpd38g$lg4$2@Kil-nws-1.UCIS.Dal.Ca> <JeffRelf.F-M.FM.il@2010_Apr5.11.09am> <hpdamk$2d93$1@adenine.netfront.net>Show Full Headers
Complete Article Headers
Message-ID: <JeffRelf.F-M.FM.s5@2010_Apr5.0.00pm> Subject: -- Date: Mon, 05 Apr 2010 19:00:35 +0000 From: Unknown <anon@nohost.local> References: <IU.D20100401.T124556.P4428.Q0@J.de.Boyne.Pollard.localhost> <hpci15$9hm$1@Kil-nws-1.UCIS.Dal.Ca> <JeffRelf.F-M.FM.UA@2010_Apr5.6.35am> <hpd38g$lg4$2@Kil-nws-1.UCIS.Dal.Ca> <JeffRelf.F-M.FM.il@2010_Apr5.11.09am> <hpdamk$2d93$1@adenine.netfront.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.os.msdos.4dos.mbox.zip!g2news1.google.com!news2.google.com!news.glorb.com!news-spur1.glorb.com!newsread.glorb.com!not-for-mail Newsgroups: news.software.readers,alt.msdos.batch,alt.msdos.batch.nt,microsoft.public.win2000.cmdprompt.admin,comp.os.msdos.4dos Organization: JeffRelf.F-M.FM Lines: 63 NNTP-Posting-Host: TOTeDHB2PKerCJKkncVMyw.32.posting.glorb.com Content-Type: Text/HTML; charset=UTF-8 X-Complaints-To: abuse@glorb.com NNTP-Posting-Date: Mon, 5 Apr 2010 19:00:36 +0000 (UTC) User-Agent: JeffRelf.F-M.FM/X.EXE X-Notice: Scanned by Mr. Bill