#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "lcmaps_log.h"
#include "pdl_variable.h"
#include "pdl_rule.h"
Include dependency graph for pdl_variable.c:
Go to the source code of this file.
Functions | |
BOOL | _add_variable (const record_t *name, const record_t *value) |
var_t* | find_variable (const char *name) |
var_t* | detect_loop (const char *name, const char *value) |
void | add_variable (record_t *name, record_t *value) |
void | free_variables (void) |
void | reduce_to_var (const char **name, rule_type_t rule_type) |
var_t* | get_variables (void) |
void | show_variables (void) |
Not all functions defined in this file are accessible to everyone. A subset is used by the pdl variable functions themselves. For the list API functions look in pdl_variables.h.
Definition in file pdl_variable.c.
|
Actual implementation of the add_variable call. When the variable has been added the call returns TRUE, otherwise its FALSE. There can be several reasons for failure:
Definition at line 89 of file pdl_variable.c. Referenced by add_variable().
|
|
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 64 of file pdl_variable.c. |
|
Try to detect a loop in the variable references. When e.g. a=b, b=c and c=a, then the call should detect a loop.
Definition at line 193 of file pdl_variable.c. Referenced by _add_variable().
|
|
Find a variable based on the variable name. This way the value of a variable can be retrieved.
Definition at line 168 of file pdl_variable.c. |
|
Free the resources allocated for the variables. Definition at line 142 of file pdl_variable.c. Referenced by free_resources().
|
|
Get a list of all variables in the configure file.
Definition at line 269 of file pdl_variable.c. |
|
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 refering variable.
Definition at line 239 of file pdl_variable.c. |
|
Print all variables and their value as described in the configure file to stdout. Definition at line 280 of file pdl_variable.c. |