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.
102 FLASH TEXT EXTRACTOR ANNOYANCE-FILTER §122<br />
122. Of course, there isn’t just text, there’s editable text, where morons can type in their credit card<br />
numbers after receiving “so cool a Flash”. We deem any initial text in the edit field a string, as well as<br />
the variable name, unless textOnly is true .<br />
〈 Parse Flash DefineEditText tag 122 〉 ≡<br />
{<br />
#ifdef FLASH_PARSE_DEBUG<br />
cout ≪ "Edit␣text␣record." ≪ endl ;<br />
#endif<br />
get16 ( );<br />
rect rBounds ;<br />
getRect (&rBounds );<br />
unsigned int flags = get16 ( );<br />
#ifdef FLASH_PARSE_DEBUG<br />
cout ≪ "DefineEditText.␣␣Flags␣=␣0x" ≪ hex ≪ flags ≪ dec ≪ endl ;<br />
#endif<br />
if (flags & seditTextFlagsHasFont ) {<br />
#ifdef FLASH_PARSE_DEBUG<br />
unsigned short uFontId = get16 ( );<br />
unsigned short uFontHeight = get16 ( );<br />
cout ≪ "FontId:␣" ≪ uFontId ≪ "␣␣FontHeight:␣" ≪ uFontHeight ≪ endl ;<br />
#else<br />
get16 ( );<br />
get16 ( );<br />
#endif<br />
}<br />
if (flags & seditTextFlagsHasTextColor ) {<br />
skip8n (4); /∗ Skip colour (including alpha transparency) ∗/<br />
}<br />
if (flags & seditTextFlagsHasMaxLength ) {<br />
#ifdef FLASH_PARSE_DEBUG<br />
int iMaxLength = get16 ( );<br />
printf ("length:%d␣", iMaxLength );<br />
#else<br />
get16 ( );<br />
#endif<br />
}<br />
if (flags & seditTextFlagsHasLayout ) {<br />
skip8n (1 + (2 ∗ 4));<br />
}<br />
string varname ;<br />
getString (varname );<br />
if (¬textOnly ) {<br />
strings .push (varname ); /∗ Emit variable name as a string ∗/<br />
}<br />
if (flags & seditTextFlagsHasText ) {<br />
string s;<br />
char c;<br />
while ((c = get8 ( )) ≠ 0) {<br />
s += c;<br />
}