properly handle arrays of typedefs and structs inside structs
add_type calls add_field_types in order to make sure that
types that are used inside the definition of some other type
are stored before that other type in the list of types.
This allows the user to print the type definitions in the order
in which the types are stored.
However, add_field_types would only consider fields
of a typedef or record type and not arrays of such types.
Consider such arrays as well.
The typedefs also need to be added to the list of types
first in PetScan::extract_array. Otherwise, they would
not even be considered.
Reported-by: Bruno bodin <bbodin@inf.ed.ac.uk>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>