Main Page | Class List | Directories | File List | Class Members | File Members

cpp_macros.c File Reference

CKPM C pre-processor macro table. More...

#include <stdlib.h>
#include <string.h>
#include "cpp_io.h"
#include "cpp_macros.h"

Functions

_macro_listML_Create ()
 create and initialize a new macro list
void ML_Destroy (struct _macro_list *l)
 destroy the macro list
void ML_Dump (int fd, struct _macro_list *l)
 dump the macro list
int ML_Add (struct _macro_list *l, char *id, char *val)
 add an entry to the macro list
int ML_Remove (struct _macro_list *l, char *id)
 remove an entry from the macro list
char * ML_Get (struct _macro_list *l, char *id)
 get an entry from the macro list
int ML_Index (struct _macro_list *l, char *id)
 get an entry index from the macro list


Detailed Description

CKPM C pre-processor macro table.


Function Documentation

int ML_Add struct _macro_list l,
char *  id,
char *  val
 

add an entry to the macro list

Parameters:
l the macro list
id the requested macro identification
val the macro value
Returns:
new lenght of the macro list on success, otherwise -1

struct _macro_list* ML_Create  ) 
 

create and initialize a new macro list

Returns:
the macro list

void ML_Destroy struct _macro_list l  ) 
 

destroy the macro list

Parameters:
l the macro list

void ML_Dump int  fd,
struct _macro_list l
 

dump the macro list

Parameters:
fd the filedesciptor index of the output file
l the macro list
Returns:
index of the found macro on success, otherwise -1

char* ML_Get struct _macro_list l,
char *  id
 

get an entry from the macro list

Parameters:
l the macro list
id the requested macro identification
Returns:
value of the found macro on success, otherwise NULL

int ML_Index struct _macro_list l,
char *  id
 

get an entry index from the macro list

Parameters:
l the macro list
id the requested macro identification
Returns:
index of the found macro on success, otherwise -1

int ML_Remove struct _macro_list l,
char *  id
 

remove an entry from the macro list

Parameters:
l the macro list
id the requested macro identification
Returns:
new lenght of the macro list on success, otherwise -1


Generated on Thu Jul 13 03:56:36 2006 for CKPMcc by  doxygen 1.4.4