12.06.2015 Views

The Annoyance Filter.pdf - Fourmilab

The Annoyance Filter.pdf - Fourmilab

The Annoyance Filter.pdf - Fourmilab

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

110 MAIL FOLDER ANNOYANCE-FILTER §129<br />

if (¬dirFolder ) {<br />

#endif<br />

#ifdef COMPRESSED_FILES<br />

〈 Check for symbolic link to compressed file 133 〉;<br />

if (jname .rfind (Compressed file type ) ≡ (jname .length ( ) −<br />

string(Compressed file type ).length ( ))) {<br />

〈 Open pipe to read compressed file 134 〉;<br />

}<br />

else {<br />

#endif<br />

if (fname ≡ "−") {<br />

is = &cin ;<br />

}<br />

else {<br />

isc.open (fname .c str ( ));<br />

is = &isc;<br />

}<br />

#ifdef COMPRESSED_FILES<br />

}<br />

#endif<br />

#ifdef HAVE_DIRECTORY_TRAVERSAL<br />

}<br />

#endif<br />

if (¬(∗is )) {<br />

cerr ≪ "Cannot␣open␣mail␣folder␣file␣" ≪ fname ≪ endl ;<br />

exit (1);<br />

}<br />

set(is , cat );<br />

}<br />

∼mailFolder( )<br />

{<br />

#ifdef COMPRESSED_FILES<br />

if (ip ≠ Λ) {<br />

pclose (ip);<br />

}<br />

#endif<br />

}<br />

void set(istream ∗i, dictionaryWord ::mailCategory cat = dictionaryWord ::Unknown )<br />

{<br />

is = i;<br />

nLines = nMessages = 0;<br />

lookedAhead = false ;<br />

lookAheadLine = "";<br />

category = cat ;<br />

dlist = Λ;<br />

tlist = Λ;<br />

〈 Reset MIME decoder state 142 〉;<br />

bodyContentType = bodyContentTypeCharset = bodyContentTypeName =<br />

bodyContentTransferEncoding = "";<br />

expectingNewMessage = true ;<br />

setNewMessageEligiblity ( );<br />

BSDfolder = false ;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!