Article View: news.software.readers
Article #248492Re: Q.: Dialog and X-Face display ... ?
From: Bernd Rose
Date: Thu, 26 Jan 2012 18:16
Date: Thu, 26 Jan 2012 18:16
45 lines
3504 bytes
3504 bytes
On Wed, 25 Jan 2012 13:45:03 -0600, VanguardLH wrote:
> I don't do Delphi so I have to guess based on other programming
> languages that I've played with. Looking at your script, is:
>
> Message[i]
>
> the same as:
>
> Message.strings[i]
Strings is the default method of the TStrinList object and therefore
can be omitted when using indexed access. So: Yes, it is the same.
> I see the latter get used in the PHP-stripping script already defined
> for the event.
You probably mean PGP? - It just makes me nervous to read that "PHP"
over and over again, and always have that gnawing doubt... ;-)
> Also, how does this script limit its scan to just the headers (i.e., up
> to the first blank line that delimits the headers)? That seems to be
> the point for the until-clause of the *outer* repeat loop.
Yes.
> Okay, but then what is the point of the inner repeat loop (in the
> then-clause of the if-statement)? i isn't getting incremented there. At
> that point in that loop, i isn't changing.
The inner loop does not only remove the line starting with "X-Face: "
but also all following lines starting with a space char until either
another header is found or the end of the headers block. This is done
to remove additional X-Face lines (in case the X-Face is spread among
multiple lines, which is possible). Please note: The deletion of each
line lets the next line take its place /without/ an increment to i.
As long as you only search for X-Face, it would be possible to break
out of the outer loop at the end of the "then" part of the if condition.
But this would increase complexity without much gain. And you couldn't
just add checks for other headers in the "if" part, as you can do now:
if (Pos('X-Face: ', Message[i]) = 1) or (Pos('Keywords: ', Message[i]) = 1) Then
Bernd
Technical Details
Message-ID:
<50tylzpof0dr$.dlg@b.rose.tmpbox.news.arcor.de>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.dca3.giganews.com!border2.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news-out.readnews.com!transit3.readnews.com!85.12.40.131.MISMATCH!xlned.com!feeder3.xlned.com!feeder.erje.net!news2.arglkargh.de!noris.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mailReferences:
<1ass3sozlgobe$.1ov5otwd4to98$.dlg@40tude.net> <1e4muey1ojn1a.dlg@justacineast.motzarella.org> <jfko1d$3kq$1@news.albasani.net> <16ihfjp1m3ml1$.16m1mn0g0z6u3.dlg@40tude.net> <jfmu3a$saf$1@news.albasani.net> <5mkwbkqbbnvm.dlg@b.rose.tmpbox.news.arcor.de> <jfpj3f$uf2$1@news.albasani.net> <jfpm3t$5sr$1@news.albasani.net>Show Full Headers
Complete Article Headers
Message-ID: <50tylzpof0dr$.dlg@b.rose.tmpbox.news.arcor.de> Subject: Re: Q.: Dialog and X-Face display ... ? Date: Thu, 26 Jan 2012 19:16:43 +0100 From: Bernd Rose <b.rose.tmpbox@expires-2012-01-31.arcornews.de> References: <1ass3sozlgobe$.1ov5otwd4to98$.dlg@40tude.net> <1e4muey1ojn1a.dlg@justacineast.motzarella.org> <jfko1d$3kq$1@news.albasani.net> <16ihfjp1m3ml1$.16m1mn0g0z6u3.dlg@40tude.net> <jfmu3a$saf$1@news.albasani.net> <5mkwbkqbbnvm.dlg@b.rose.tmpbox.news.arcor.de> <jfpj3f$uf2$1@news.albasani.net> <jfpm3t$5sr$1@news.albasani.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.dca3.giganews.com!border2.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news-out.readnews.com!transit3.readnews.com!85.12.40.131.MISMATCH!xlned.com!feeder3.xlned.com!feeder.erje.net!news2.arglkargh.de!noris.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Newsgroups: news.software.readers User-Agent: 40tude_Dialog/2.0.15.41 (8dd9ebd0.176.266) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Lines: 45 Organization: Arcor NNTP-Posting-Date: 26 Jan 2012 19:17:58 CET NNTP-Posting-Host: 3b56ef52.newsspool4.arcor-online.net X-Trace: DXC=; 8g`R9EE3ITaoembcbF; DQ4IUK<Cl32<Q4Fo<]lROoRQ8kF<OcfhCO[fDUB91[DZ>SBYf[Tl<>RjZok@\WOH8TjQbcfb^QYmB@X X-Complaints-To: usenet-abuse@arcor.de X-Original-Bytes: 3230