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.
192 HEADER INCLUDE FILES ANNOYANCE-FILTER §243<br />
{"write", 1, Λ, 218},<br />
{0, 0, 0, 0}<br />
};<br />
int option index = 0;<br />
bool lastOption = false ; /∗ Set true to exit command line processing after option ∗/<br />
int exitStatus = 0; /∗ Program exit status ∗/<br />
while ((¬lastOption ) ∧ (opt = getopt long (argc, argv , "j:m:r:t:uv", long options ,<br />
&option index )) ≠ −1) {<br />
switch (opt ) {<br />
case 222: /∗ −−annotate options Add annotation options to −−transcript output ∗/<br />
while ((∗optarg ) ≠ 0) {<br />
unsigned int ch = (∗optarg ++) & # FF;<br />
if (isascii (ch ) ∧ isalpha (ch ) ∧ isupper (ch )) {<br />
ch = islower (ch );<br />
}<br />
annotations .set(ch );<br />
}<br />
break;<br />
case 232:<br />
/∗ −−autoprune n Automatically prune unique words when dictionary exceeds n bytes ∗/<br />
autoPrune = atoi (optarg );<br />
if (verbose ) {<br />
cerr ≪ "Unique␣words␣will␣be␣automatically␣pruned␣from␣dictionary␣w\<br />
hen␣it␣exceeds␣" ≪ autoPrune ≪ "␣bytes." ≪ endl ;<br />
}<br />
break;<br />
case 225: /∗ −−biasmail n Set frequency bias of words in legitimate mail to n ∗/<br />
mailBias = atof (optarg );<br />
if (verbose ) {<br />
cerr ≪ "Frequency␣bias␣for␣words␣and␣phrases␣in␣legitimate␣mail␣set␣to␣" ≪<br />
mailBias ≪ "." ≪ endl ;<br />
}<br />
break;<br />
case 221: /∗ −−binwords n Parse binary streams for words of n characters or more ∗/<br />
streamMinTokenLength = atoi (optarg );<br />
if (verbose ) {<br />
if (streamMinTokenLength > 0) {<br />
cerr ≪ "Binary␣streams␣will␣be␣parsed␣for␣words␣of␣" ≪ streamMinTokenLength ≪<br />
"␣characters␣or␣more." ≪ endl ;<br />
}<br />
else {<br />
cerr ≪ "Binary␣streams␣will␣not␣be␣parsed␣for␣words." ≪ endl ;<br />
}<br />
}<br />
break;<br />
case 231: /∗ −−bsdfolder Next −−mail or −−junk folder uses BSD “From␣” separator ∗/<br />
bsdFolder = true ;<br />
break;<br />
case 209: /∗ −−classify fname Classify message in fname ∗/<br />
{