verify.c
--------

History
-------
26th October 1992  J R C  Started

   Various functions to check the validity of a draw file. Originally, this
was done on the fly as the file was rendered, but that was changed when SWI
DrawFile_DeclareFonts was added, since then it would have existed in two
places.

   The idea is to check everything everytime a draw file is rendered or hasd
its fonts declared. This means the code must be quick. In particular, the
following two things which often cause errors are not checked: (j) does this
font exist? (ij) does the mode of this sprite exist on this machine?

   In the first case, the font is displayed anyway, but in System font. In
the second, the sprite is simply skipped without output. (Maybe this should
be changed?)

   The module does check:

         the file size ids at least big enough to contain the draw file
      header;

         the tag is "Draw";

         the file version number is <= 201;

         there is at most one font table object;

         if there are any text or transformed text objects (other than
      those in system font), there is at least one font table object;

         all objects lie within their parent (which is the file for a
      top-level object, a group for an obect oin a group, and a tagged
      object for an object which is within a tagged object).

   The module also provides two functions which don't seem to belong
anywhere else: |verify_overlap| provides the usual intersection of bounding
boxes code, and |verify_lookup_font_index| looks up a font index (as used in
text and transformed text objects) and returns a pointer to a font name, or
NULL if it is not found.
