#include "pdl.h"
#include "pdl_rule.h"
Go to the source code of this file.
| Data Structures | |
| struct | var_s | 
| Structure keeps track of the variables, their value and the line number they are defined on.  More... | |
| Typedefs | |
| typedef var_s | var_t | 
| Structure keeps track of the variables, their value and the line number they are defined on. | |
| Functions | |
| void | add_variable (record_t *name, record_t *value) | 
| void | reduce_to_var (const char **name, rule_type_t rule_type) | 
| void | show_variables (void) | 
| void | free_variables (void) | 
| var_t * | get_variables (void) | 
All functions listed in here are accessible and usable for external "modules".
Definition in file pdl_variable.h.
| 
 | ||||||||||||
| Wrapper function for the _add_variable() function call. The hard work is done in the _add_variable() call. When that call succeeds only the resources allocated for holding the name and value parameters are freed, i.e. the structures name and value. In case the _add_variable() calls fails, the string that is contained within the name and value strutures is freed as well. 
 
 Definition at line 71 of file pdl_variable.c. References _add_variable(), record_t, and record_s::string. | 
| 
 | 
| Free the resources allocated for the variables. Definition at line 149 of file pdl_variable.c. References var_s::name, var_s::next, var_s::value, and var_t. Referenced by free_resources(). | 
| 
 | 
| Get a list of all variables in the configure file. 
 
 Definition at line 277 of file pdl_variable.c. References var_t. | 
| 
 | ||||||||||||
| Reduce the variable to its real value. When a variable has another variable as its value, the variable will be reduced to the value of the referring variable. 
 
 
 Definition at line 247 of file pdl_variable.c. References find_variable(), left_side, var_s::lineno, lineno, var_s::name, var_s::okay, PDL_WARNING, right_side, rule_t, STATE, TRUE, var_s::value, var_t, and warning(). Referenced by reduce_rule(). | 
| 
 | 
| Print all variables and their value as described in the configure file to stdout. Definition at line 288 of file pdl_variable.c. References lcmaps_log_debug(), var_s::name, var_s::next, var_s::value, and var_t. | 
 1.3.5
 
1.3.5