|
|
constants.c File ReferenceImplementations of the functions operating on Tconstants. More... #include "constants.h" #include "error.h" #include "boolean.h" #include "defines.h" #include <stdlib.h> #include <string.h> Go to the source code of this file.
Detailed DescriptionImplementations of the functions operating on the Tconstants.
Definition in file constants.c. Function Documentation
Creates a new set of constants.
Definition at line 21 of file constants.c. References Tconstants::cts, INIT_NUM_CONSTANTS, Tconstants::max_constants, Tconstants::n, and NEW.
Returns the number of constants currently in the set.
Definition at line 33 of file constants.c. References Tconstants::n.
Adds a new constnat to the set. It does not test whether or not there is another constant with the same name. This must be tested before using AddConstant calling the function 'GetConstantWithName'
Definition at line 43 of file constants.c. References Tconstants::cts, Tconstants::max_constants, MEM_DUP, Tconstants::n, Tconstant::name, NEW, and Tconstant::vs.
Determines the numerical identifier for a constant with a given name. It can be used also to check if a constant is included in the set or not.
Definition at line 66 of file constants.c. References Tconstants::cts, FALSE, Tconstant::name, NO_UINT, and TRUE.
Returns the value of a constant, given the numerical identifier of this constant.
Definition at line 91 of file constants.c. References Tconstants::cts, Error(), and Tconstant::vs.
Here is the call graph for this function:
Prints a set of constants into a stream, that can be stdout.
Definition at line 104 of file constants.c. References Tconstants::cts, Tconstants::n, Tconstant::name, and Tconstant::vs.
Deletes a set of constants.
Definition at line 115 of file constants.c. References Tconstants::cts, Tconstants::n, and Tconstant::name. |