Synopsis

PDX_MSGT mda_DefaultEntity(long option, void *ent)

Purpose

Default an entity's fields.

Description

The fields within the specified entity will be set to the defaults defined in the DDF. If no default value was specified, the appropriate form of 0 or NULL will be used, depending on the field type. All union fields will be set so to their first member and it will be defaulted. Count fields will be set to 0. If a field is dimensioned by a count value and operator (e.g. points[npnts+1]) such that even with a count of 0 there is some data present, memory for the data will be allocated and it will be defaulted according to the rules above. Applications should be careful of this situation as they must reallocate this memory rather than simply allocating it.

Input

option

Options (not used)

ent

The entity to be defaulted

Return

MDA error code