ZOO-Project
Functions | Variables
main_conf_read.y File Reference
#include <service.h>

Functions

void crerror (const char *s)
 Print on stderr the message and the line number of the error which occurred. More...
 
void usage (void)
 
int crlex (void)
 
int crlex_destroy (void)
 
 if (debug)
 
 free (curr_key)
 
 free (current_content)
 
 snprintf (current_maps->name,(strlen($1)+1),"%s", $1)
 
int conf_read (const char *file, maps *my_map)
 Parse the main.cfg file and fill the maps structure. More...
 

Variables

static mapscurrent_maps =NULL
 
static mapcurrent_content =NULL
 
static char * curr_key =zStrdup($1)
 
static int debug =0
 
int crdebug
 
char crtext []
 
int crlineno
 
FILE * crin
 
union {
char * s
 
char * chaine
 
char * key
 
char * val
 
document
 
miscetoile __pad0__
 
contentetoile __pad1__
 
pair __pad2__
 
 EPAIR
 
 else
 
 SPAIR {if(curr_key!=NULL) free(curr_key)
 
processid __pad3__
 
current_maps next =NULL
 
current_maps content =NULL
 

Function Documentation

◆ conf_read()

int conf_read ( const char *  file,
maps my_map 
)

Parse the main.cfg file and fill the maps structure.

Parameters
filethe filename to parse
my_mapthe maps structure to fill

◆ crerror()

void crerror ( const char *  s)

Print on stderr the message and the line number of the error which occurred.

Parameters
sthe error message

◆ crlex()

int crlex ( void  )

◆ crlex_destroy()

int crlex_destroy ( void  )

◆ free() [1/2]

free ( curr_key  )

◆ free() [2/2]

free ( current_content  )

◆ if()

if ( debug  )

◆ snprintf()

snprintf ( current_maps->  name,
(strlen( $1)+1)  ,
"%s"  ,
  $1 
)

◆ usage()

void usage ( void  )

Variable Documentation

◆ __pad0__

miscetoile __pad0__

◆ __pad1__

contentetoile __pad1__

◆ __pad2__

pair __pad2__

◆ __pad3__

processid __pad3__

◆ content

current_maps content =NULL

◆ crdebug

int crdebug

◆ crin

FILE* crin

◆ crlineno

int crlineno

◆ crtext

char crtext[]

◆ curr_key

curr_key =zStrdup($1)
static

◆ current_content

freeMap & current_content =NULL
static

◆ current_maps

current_maps =NULL
static

◆ debug

int debug =0
static

◆ document

union { ... } document

◆ else

else
Initial value:

◆ EPAIR

EPAIR
Initial value:

◆ next

current_maps next =NULL

◆ SPAIR

SPAIR {if(curr_key!=NULL) free(curr_key)
curr_key
static char * curr_key
Definition: main_conf_read.y:32
current_content
static map * current_content
Definition: main_conf_read.y:31
createMap
map * createMap(const char *pccName, const char *pccValue)
Create a new map.
Definition: service.c:173
addToMap
void addToMap(map *pMap, const char *pccName, const char *pccValue)
Add key value pair to an existing map.
Definition: service.c:578