12.4 Constant Definitions

Each MAPDEF structure contains a pointer to an array of pointers to constant definitions. The format of a constant definition is the same as that of a symbol definition (you can use the SYMDEF structure described in Section 12.3, “Symbol Definitions”).

The ppConstDef member in the current MAPDEF structure specifies the file offset of the array of constant-definition pointers, and the offset to each constant definition can be calculated from each element in the array, as follows:

aConstPtr = (WORD *)(pFileBuffer + md.ppConstDef);

for (n = 0; n < md.cConsts; n++) {
    pConstDef = (SYMDEF *)(pFileBuffer + aConstPtr[n]);
    .
    .
    /* Use the symbol information here. */
    .
    .
}