Article View: news.software.readers
Article #233922--
From: _
Date: Mon, 22 Jun 2009 09:34
Date: Mon, 22 Jun 2009 09:34
109 lines
5679 bytes
5679 bytes
FireFox is my main browser; I use IE8 at times.
All of the 20 webPages I bookMarked use HTML, of course.
What makes you(Rom) think they wouldn't ?
I don't keep track of which newsReaders support HTML.
I've done very little to add webBrowsing to X.ZIP, too much work.
Same story when it comes to turning X.ZIP into a code-editor/IDE.
Sadly, my phone company(qWest) sends me HTML-only eMails.
X.ZIP converts it to regular text; links from A[hRef] show after </A>.
>From www.JeffRelf.F-M.FM/X.CPP The code looks like this:
#define feedMe \
if ( !Ch ) \
/* No more data on the line, get another line. */ \
if ( ++ PP >= EE \
|| ( P = B = *PP, B && MimeSep && EqN( B, *MimeSep, Sz_MimeSep ))) \
/* No more HTML, might go to the next MIME part. */ \
goto EoScan ;
Sh( L" %c◀――▶HTML", ChNew ); Ch = 0 ; LnP _hRef = 0 ;
▶BoTag&:
// Label “▶BoTag&” means: find Begining of a <Tag> or &Entity;.
LnP euText = 0 ; feedMe
While( !(
Ch == '&' || Ch == '<'
&& ( Ch2 == '!' || Ch2 == '?' || isalpha( Ch2 )
|| Ch2 == '/' && isalpha( P[2] ) ) ) )
// Scaning for a <Tag> or &Entity;.
if ( !euText && Ch > 32 )
// This is regular text, “euText”, to be printed.
euText = P ;
LnP BoTag& = P ;
if ( euText ) {
// Print the regular text, “euText”.
int More = BoTag& - euText ;
if ( strSz( * Ln.PP ) + More > 72 )
// Wrap at 72 columns.
Sh( L"" );
// If this line is long, it'll be wrapped elsewhere.
Extend_Ln( *Ln.PP, euText, More ); }
if ( !Ch )
// No <Tag> or “&Entity;” on this line, scan the next line.
goto ▶BoTag& ;
if ( Ch == '<' ) {
// “P” and “BoTag&” point to the <Tag>.
if ( EqiN( BoTag&, L"<Table", 6 ) || EqiN( BoTag&, L"<Br", 3 ) )
// Print a newLine.
Sh( L"" );
if ( _hRef && EqiN( BoTag&, L"</A", 3 ) )
// Print the A[hRef] link after </A>.
Sh( L" %s\n\n", _hRef ), _hRef = 0 ;
if ( Ch2 == '!' && P[2] == '-' )
LOOP{ // 4998a81c$3$18252$4c5ecfc7@fe1.usenet.com
// An HTML comment, skip to the “-->”.
While( ! ( Ch == '-' && Ch2 == '-' && P [ 2 ] == '>' ) );
if ( Ch ) {
// Found the end of the comment.
P += 3, Ch = *P ; goto ▶BoTag& ; }
// It's a multi-line comment.
feedMe }
LOOP{
While( !( Ch == '>' || Ch != '\\' && Ch2 == '"' ) );
if ( Ch == '>' ) {
// Found the end of the <Tag>, look for more stuff.
Ch = * ++ P ; goto ▶BoTag& ; }
if ( Ch2 == '"' ) {
// Skip the end of the quoted string.
P ++ ;
LnP hRef // Remember “ hRef="" ” links.
= Ch == '=' && P - B >= 5 && EqiN( P - 5, L"href=", 5 )
? P + 1 : 0 ;
While( Ch == '\\' || Ch2 != '"' );
if ( hRef )
// The quoted string is an hRef link, print it after </A>.
P[1] = 0, _hRef = hRef ;
if ( Ch )
// Skip past the end of the quoted string.
P += 2 ; }
// It's a multi-line <Tag>.
feedMe } }
P ++ ;
if ( Ch2 == '#' ) {
// This is a “�”-style entity.
Ch = RaisC ( ++ P ); wchar_t New_Ch = 0 ;
int Digit = Ch == 'O' ? 8 : Ch == 'X' ? 16 : isDigit( Ch ) ? 10 : 0;
if ( Digit )
// Get the glyph, hex or decimal.
New_Ch = AtoI_Base( rv == 10 ? P : ++ P, & P, rv );
if ( New_Ch && * P ++ == ';' ) {
// Print the glyph, find more stuff.
Extend_Ln( *Ln.PP, & New_Ch, 1 ); goto ▶BoTag& ; } }
else {
// This is a “&”-style entity.
LnP Rep [] = {
L"lt;", L"<", L"gt;", L">", L"nbsp;", L" ", L"trade;", L"™"
, L"amp;", L"&", L"quot;", L"\""
, L"apos;", L"'", L"Copy;", L"©" };
LnA ZZ = Rep - 1 ;
Loop( sizeof Rep / sizeof * Rep / 2 ) {
// Scan for a known &Entity;.
LnP S = * ++ ZZ, R = * ++ ZZ ; int Len = strSz( S );
if ( EqiN( P, S, Len ) ) {
// Print the glyph, find more stuff.
P += Len, Extend_Ln( *Ln.PP, R, 1 ); goto ▶BoTag& ; } } }
// False alarm, wasn't a known Entity, print as-is.
Extend_Ln( *Ln.PP, BoTag&, 1 ), P = BoTag& + 1 ; goto ▶BoTag& ; }
Technical Details
Message-ID:
<_@Jeff_Relf.Seattle.2009_Jun22.2.34am.gO>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.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!news-spur2.glorb.com!homer.glorb.com!not-for-mailReferences:
<_@Jeff_Relf.Seattle.2009_Jun20.1.18pm.zj> <h1mchs$f4t$1@pcls6.std.com> <_@Jeff_Relf.Seattle.2009_Jun21.4.34pm.2K> <h1mo75$rrf$1@pcls6.std.com> <_@Jeff_Relf.Seattle.2009_Jun21.8.29pm.4N> <12vlxg6x91o9z$.1ipmnga819en9.dlg@40tude.net>Show Full Headers
Complete Article Headers
Message-ID: <_@Jeff_Relf.Seattle.2009_Jun22.2.34am.gO> Subject: -- Date: Mon, 22 Jun 2009 09:34:52 +0000 From: _@Jeff_Relf.Seattle.inValid References: <_@Jeff_Relf.Seattle.2009_Jun20.1.18pm.zj> <h1mchs$f4t$1@pcls6.std.com> <_@Jeff_Relf.Seattle.2009_Jun21.4.34pm.2K> <h1mo75$rrf$1@pcls6.std.com> <_@Jeff_Relf.Seattle.2009_Jun21.8.29pm.4N> <12vlxg6x91o9z$.1ipmnga819en9.dlg@40tude.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.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!news-spur2.glorb.com!homer.glorb.com!not-for-mail Newsgroups: news.software.readers Organization: Glorb Internet Services, http://www.glorb.com Lines: 109 NNTP-Posting-Host: /NE75jCikK8Pv/cxW/4k9w.user.posting2.glorb.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@glorb.com NNTP-Posting-Date: Mon, 22 Jun 2009 09:34:52 +0000 (UTC) X-Notice: Scanned by Mr. Bill User-Agent: JeffRelf.F-M.FM/X.ZIP X-Original-Bytes: 5542