Synopsis
(macro) int mda_GetUnionType(void *union_fld)
Purpose
Get the union type of a union field.
Description
The type of the union field is returned. The result of this function can be compared against the #defines generated by ddc for the union types. For example, in an entity declared as:
.RS 3 .nf entity 1:0 Line { union font { char fnum; ptr fdptr; }; float start[3]; float end[3]; }; .sp and instanced as: .sp T_LINE line_ent; .sp the font field union type can be checked using by: .sp switch (mda_GetUnionType (&line_ent.font)) { case FONT_FNUM: . . case FONT_FDPTR: . . } .fi .RE
Input
union_fld
The union field whose type is to be returned
Return
The type of union_fld