# NAME

ddc − Data Definition File (DDF) compiler

# SYNOPSIS

ddc [−help] [−anone | −aword | −along | −anatural] [−double | −float ] [−i2] [−lu] [−needs] [−P\fIprefix\fP] [−s] filename

# DESCRIPTION

ddc takes the specified ASCII Data Definition File (DDF) and compiles it for use by the MDA and DDF subsystems. See mda_intro(3) and ddf_intro(3) for more information about using the output of ddc . The output of ddc will be stored in 2 include files. The names of these files will be prefixed with the name of the input DDF file. The first of these files, xxx_structs.h contains C structure definitions corresponding to the entities defined in the DDF. The second include file, xxx_ddf.h contains run-time access information used by the MDA subsystem. The xxx_structs.h file should be included in any functions which access entity information. The xxx_ddf.h file should only be included in the file which sets the model_info structure to be passed to mda_AllocateModel. See mda_intro(3) for further information on setting the DDF which a model will use.

Note: The input DDF file name should be no longer than six characters if MS-DOS compatibility is required. This requirement is to satisfy the MS-DOS eight character file name limit.

The −a alignment options allow you to override the default alignment for the machine running ddc . Normally the default alignment should be used (i.e. no −a option should be specified). The −help option displays the default alignment type.

# OPTIONS

−help

Displays a summary of the available options and what the default alignment type is.

−anone

Specifies that no structure padding should be done.

−aword

Specifies that word (2 byte) structure padding should be done. Padding will be added between structure members so that all non-char fields will be at an even offset.

−along

Specifies that long word (4 byte) structure padding should be done. Padding will be added between structure members so that all fields larger than 4 bytes will be at an offset evenly divisible by 4.

−anatural

Specifies that natural (usually 8 byte) structure padding should be done. Padding will be added between structure members so that all fields will be at an offset which is evenly divisible by the size of the field.

−double

All float type fields will be treated as if they were declared doubles.

−float

All double type fields will be treated as if they were declared float.

−i2

All int type fields will require 2 bytes of storage rather than the default of 4. This option should be used when the target platform has 16 bit integers and the compiler is being run on a 32 bit system.

−lu

The #defines generated for union types should be prefaced with the entity name.

−needs

Generate #ifdef statements around each entity definition in the xxx_structs.h file. To use a particular entity type within a source file, add a #define NEED_entity_name before including the xxx_structs.h file. This reduces the amount of symbolic information stored by the compiler when there are a large number of entities defined in the DDF.

−P prefix

Specifies a prefix to be prepended to make the items in the xxx_structs.h file be name-unique. The prefix is added to the attribute, union, entity name, and NEEDS_ defines along with the names used for the structure typedefs and internal structure tags.

−pp

Pretty print output. This generates the xxx_structs.h include file with #defined names and their respective values in neat columns.

−s

Display statistics about the memory requirements of the run-time DDF information after the DDF has been compiled.

# SEE ALSO

ddf_intro(3), mda_intro(3)

# DIAGNOSTICS

Assorted diagnostic messages will be issue when errors are encountered in the input file. Most diagnostics display the source line in error and a pointer to the part of the line being parsed when the error occurred. If a semi-colon is missing, the line displayed will usually be the one following the offending line. Warnings do not prevent the generation of the include files while errors do. A summary of the number of warnings and errors is displayed at the end of the compile.