The Annoyance Filter.pdf - Fourmilab
The Annoyance Filter.pdf - Fourmilab
The Annoyance Filter.pdf - Fourmilab
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
208 DEVELOPMENT LOG ANNOYANCE-FILTER §256<br />
Modified the −−test option so that if the −−transcript option has been previously specified with<br />
standard output as the destination (“−”), the junk probability is not written to standard output at the<br />
end of the transcript.<br />
2002 September 17<br />
<strong>The</strong> Base64 decoder could hang if one of the lines it was decoding contained white space. Fixed.<br />
Added logic to detect and discard header items which begin with our own Xfile sentinel. This shouldn’t<br />
happen in the normal course of things, but somebody may try to spoof a downstream filter by sending<br />
mail which contains a sentinel purporting to be a classification by of of its legitimacy. Deleting our<br />
own header items also allow us to process our own transcripts containing them and reproduce the same<br />
results as if they hadn’t been added.<br />
Cleaned up the horrific 〈 Activate MIME decoder if required 153 〉 section which “jes’ grew” in mailFolder ::nextLine<br />
as more and more complexities were cranked in to MIME part decoding, multiple byte character sets,<br />
parsing ASCII strings out of binary data streams, etc.<br />
2002 September 18<br />
Cleaned up documentation of command line options, clarifying that they are logically commands which<br />
must be specified in the order in which they are to be executed. In the process, I added an example<br />
of invoking annoyance−filter as a pre-processor for a mail sorting program such as Procmail to the<br />
“Quick and dirty user guide”.<br />
Added a new annoyance−filter−run shell script to execute the program in default filter mode with<br />
the executable and dictionary installed in the default “$HOME/.annoyance−filter” directory. Oh, you<br />
haven’t hear about that. . .well, stay tuned. . .details in the next episode.<br />
Incremental refinement of the README and INSTALL files, with many keystrokes to go before we put these<br />
documents to sleep.<br />
Added −−verbose tell-tales for the −−plot and −−statistics options.<br />
Replaced the annoyance−filter.1 manual page with a cop-out which directs the esteemed reader to<br />
the PDF program documentation. This thing is changing so rapidly that the last thing I need is to<br />
maintain four copies of the bloody command line option documentation. Four? Think about it: the<br />
program (CWEB), its embedded −−help option text, a Web page (nonexistent at the moment, thank<br />
Bob), and a manual page. Keeping all four simultaneously in sync is something which could appeal<br />
only to an accountant. I’m a programmer, not an accountant—I drink their blood, but I don’t do their<br />
work.<br />
<strong>The</strong> code which discards header lines we’ve generated attempted to remove lines from the transcript<br />
even when no transcript was being generated, for example, when adding a message we’d previously<br />
processed to the −−mail or −−junk database. This caused a Λ pointer reference in 〈 Check for lines with<br />
our sentinel already present in the header 144 〉—fixed.<br />
Hours of patient, unremunerated toil cleaning up Makefile.in to bash things into a distributable<br />
form. I added an install target which installs the program in the default $HOME/.annoyance−filter<br />
directory, creating a customised run program (annoyance−filter−run in the build directory) which<br />
supplies the home directory which sendmail doesn’t. Massive clean-up of Makefile.in, yielding a<br />
template which is far more generic for our next foray into software land.<br />
2002 September 19<br />
Further testing revealed that the segmentation fault in dictionary ::purge which I thought I fixed a<br />
week or so ago was still lurking to bite the unwary soul whose dictionary contained a large number of<br />
words eligible for purging. As far as I can determine, when you erase an item from a set, not only does