Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

pdl_variable.h File Reference

Include file for using the pdl variables. More...

#include "pdl.h"
#include "pdl_rule.h"

Include dependency graph for pdl_variable.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

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 struct var_s  var_t
 Structure keeps track of the variables, their value and the line number they are defined on. More...


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_tget_variables (void)


Detailed Description

Include file for using the pdl variables.

All functions listed in here are accessible and usable for external "modules".

Author:
G.M. Venekamp (venekamp@nikhef.nl)
Version:
Revision:
1.6
Date:
Date:
2003/07/30 14:37:09

Definition in file pdl_variable.h.


Typedef Documentation

typedef struct var_s var_t
 

Structure keeps track of the variables, their value and the line number they are defined on.


Function Documentation

void add_variable ( record_t * name,
record_t * value )
 

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.

Parameters:
name   Name of the variable.
value   Value of the variable.

Definition at line 64 of file pdl_variable.c.

void free_variables ( void )
 

Free the resources allocated for the variables.

Definition at line 142 of file pdl_variable.c.

var_t* get_variables ( void )
 

Get a list of all variables in the configure file.

Returns:
First variable of the list.

Definition at line 269 of file pdl_variable.c.

void reduce_to_var ( const char ** name,
rule_type_t rule_type )
 

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.

Parameters:
name   Name of the variable to be reduced.
Returns:
Real value of the redunced variable.

Definition at line 239 of file pdl_variable.c.

Referenced by reduce_rule().

void show_variables ( void )
 

Print all variables and their value as described in the configure file to stdout.

Definition at line 280 of file pdl_variable.c.


Generated at Thu Mar 4 17:39:44 2004 for edg-lcmaps by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001