The Annoyance Filter.pdf - Fourmilab
The Annoyance Filter.pdf - Fourmilab
The Annoyance Filter.pdf - Fourmilab
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
§245 ANNOYANCE-FILTER HEADER INCLUDE FILES 199<br />
245. Print a primate-readable message giving the version of the program, source and contact information,<br />
and optional features compiled in.<br />
〈 Print program version information 245 〉 ≡<br />
cout ≪ PRODUCT "␣" VERSION ≪ endl ;<br />
cout ≪ "Last␣revised:␣" REVDATE ≪ endl ;<br />
〈 List optional capabilities configured in this build 247 〉;<br />
cout ≪ "<strong>The</strong>␣latest␣version␣is␣always␣available␣from:" ≪ endl ;<br />
cout ≪ "␣␣␣␣http://www.fourmilab.ch/annoyance−filter/" ≪ endl ;<br />
cout ≪ "Please␣report␣bugs␣to:" ≪ endl ;<br />
cout ≪ "␣␣␣␣bugs@fourmilab.ch" ≪ endl ;<br />
This code is used in section 243.<br />
246. This little utility function worries about printing the label before the first optional capability<br />
and keeping track of how many we’ve printed in order to say “none” if that’s the case.<br />
〈 Utility functions 219 〉 +≡<br />
static unsigned int nOptionalCaps = 0;<br />
static void printOptionalCapability (const string &s)<br />
{<br />
if (nOptionalCaps ≡ 0) {<br />
cout ≪ "Optional␣capabilities␣configured:" ≪ endl ;<br />
nOptionalCaps ++;<br />
}<br />
cout ≪ "␣␣␣␣" ≪ s ≪ "." ≪ endl ;<br />
}<br />
247. Show which optional features detected by configure were built into the program.<br />
〈 List optional capabilities configured in this build 247 〉 ≡<br />
#ifdef HAVE_PDF_DECODER<br />
printOptionalCapability ("Decoding␣strings␣in␣PDF␣attachments");<br />
#endif<br />
#ifdef HAVE_DIRECTORY_TRAVERSAL<br />
printOptionalCapability ("Directory␣traversal␣in␣the␣−−mail␣and␣−−junk␣options");<br />
#endif<br />
#ifdef HAVE_MMAP<br />
printOptionalCapability ("Memory␣mapped␣access␣to␣dictionary␣and␣fast␣dictionary␣files");<br />
#endif<br />
#ifdef HAVE_PLOT_UTILITIES<br />
printOptionalCapability ("Plotting␣distribution␣histogram␣(−−plot␣option)");<br />
#endif<br />
#ifdef POP3_PROXY_SERVER<br />
printOptionalCapability ("POP3␣proxy␣server");<br />
#endif<br />
if (nOptionalCaps ≡ 0) {<br />
cout ≪ "Optional␣capabilities␣configured:␣none." ≪ endl ;<br />
}<br />
This code is used in section 245.