Article View: news.software.readers
Article #229484I changed every bit of the code Les Harris quoted.
From: Jeff▲Relf
Date: Fri, 30 Jan 2009 19:33
Date: Fri, 30 Jan 2009 19:33
47 lines
2915 bytes
2915 bytes
I changed every bit of the code Les Harris quoted.
In JeffRelf.F-M.FM/X.CPP, it now looks like this:
//“ LnP⒳( Title ) ”, for example, creates a variable named “ Title ”
// and sets it to the current line ( and null terminates it ).
//
// “ Title ” is then used to see if the outgoing post ( or eMail )
// has this essential field; it's also used to report what was sent.
#define LnP⒳( Field ) getField( P ); LnP Field = BoFld ;
// BoFld: Begining of Field; EoFld: End of Field.
LnP BoFld, EoFld ; wchar_t ChEoFld ;
getField( LnP & P ) { LnP B = P ; int Ch, Ch2 ;
// Remove leading whitespace ( tabs have already been removed ).
While( Ch == 32 );
if ( P == B && Ch == '.' && Ch2 == '.' )
// When testing and reporting, a leading “ .. ” becomes just “ . ”.
P ++ ;
BoFld = B = P ; LnP E = FromStart( B, 10 );
if ( ! E || E > B + 120 ) {
// No lineFeed or the line is too long;
// so P ( a.k.a. EoFld ) is limited to 120 columns or
// the lineLength, whichever is small-er ( not big-ER ).
if ( ! E ) E = FromStart( B, 0 ); P = B + er( 120, E - B ); }
else {
// Have lineFeed; remove trailing whitespace.
WhileBac( P > B && Ch <= 32 ); if ( Ch > 32 ) P ++ ; }
// Clobber the end of the line with a null,
// but use ChEoFld to remember what was there.
EoFld = P, ChEoFld = * P, * P = 0, P = E ;
if ( * P )
// Set P to the start of the next line, if there is one.
P ++ ;
}
.........
inline int er( int X, int Y ) {
// returns whichever is small-er ( not big-ER )
return X < Y ? X : Y ; }
#define While( Should_Loop ) Ch = 1 , P -- ; \
while ( Ch && ( Ch = * ++ P, Ch2 = ! Ch ? 0 : P[ 1 ], Should_Loop ) )
#define WhileBac( Should_Loop ) \
Ch = Ch2 = 0; if ( ! E ) E = FromStart( B, 0 ); P = E ; \
while ( P >= B && ( Ch2 = * P , Ch = * -- P , Should_Loop ) )
Technical Details
Message-ID:
<Jeff_Relf@Seattle.2009_Jan.30|11.33am|K>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!border2.nntp.ams.giganews.com!nntp.giganews.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mailReferences:
<z7ednbZD8-zrdh_UnZ2dnUVZ_q_inZ2d@giganews.com> <Jeff_Relf@Seattle.2009_Jan.30|7.30am|y>Show Full Headers
Complete Article Headers
Message-ID: <Jeff_Relf@Seattle.2009_Jan.30|11.33am|K> Subject: I changed every bit of the code Les Harris quoted. Date: Fri, 30 Jan 2009 19:33:13 +0000 From: Jeff▲Relf <Jeff_Relf@Seattle.Test> References: <z7ednbZD8-zrdh_UnZ2dnUVZ_q_inZ2d@giganews.com> <Jeff_Relf@Seattle.2009_Jan.30|7.30am|y> 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!border2.nntp.ams.giganews.com!nntp.giganews.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Newsgroups: news.software.readers Lines: 47 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net O/CYEma+KNBXNrCjC7v/GwakUTYisFDU++t8+P8gV90AcmK0xc Cancel-Lock: sha1:dz9X968m0M0esL+ZwB7iVMmmS+U= User-Agent: JeffRelf.F-M.FM/X.ZIP