On 23/10/2009, Jeff Wormsley <dawor...@comcast.net> wrote:
>
>  That's dangerous, though, if your magic number's two bytes aren't printable

That should never be a problem for my tool though. The tool I am
writing is specific to the INF help format. The tool dumps the file
structure to a text file. (I need this for debugging purposes)

When my app processes a file, it reads the first 155 bytes (header
information), then does a numerical check of the magic number in the
header. If it's an unknown value, it stops right there. If it's a
known value, it continues at which point it starts outputing the text
to file.


-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to