Me@7: /* Me@7: * Me@7: * Author: SeanHalle@yahoo.com Me@7: * Me@7: * Created on November 19, 2009, 6:30 PM Me@7: */ Me@7: Me@7: #ifndef _PARAM_H Me@7: #define _PARAM_H Me@7: Me@7: #include "../../VMS_Implementations/VMS_impl/VMS_primitive_data_types.h" Me@7: #include "../../VMS_Implementations/VMS_impl/vmalloc.h" Me@7: Me@7: typedef Me@7: struct Me@7: { int type; Me@7: int intValue; Me@7: char * strValue; Me@7: float floatValue; Me@7: } Me@7: ParamStruc; Me@7: Me@7: #define INT_PARAM_TYPE 0 Me@7: #define STRING_PARAM_TYPE 1 Me@7: #define FLOAT_PARAM_TYPE 2 Me@7: Me@7: #define PARAM_BAG_HASHSIZE 1024 Me@7: Me@7: typedef struct _ParamBagHashEntry ParamBagHashEntry; Me@7: Me@7: struct _ParamBagHashEntry Me@7: { Me@7: char *key; Me@7: ParamStruc *param; Me@7: struct _ParamBagHashEntry *next; Me@7: } Me@7: /*ParamBagHashEntry*/; Me@7: Me@7: Me@7: typedef Me@7: struct Me@7: { int bagSz; Me@7: ParamBagHashEntry* *entries; Me@7: } Me@7: ParamBag; Me@7: Me@7: Me@7: ParamBag *makeParamBag(); Me@7: void readParamFileIntoBag( char *paramFileName, ParamBag * bag ); Me@7: ParamStruc *getParamFromBag( char *key, ParamBag * bag ); Me@7: int addParamToBag( char* key, ParamStruc *param, ParamBag *bag ); Me@7: void freeParamBag( ParamBag *bag ); Me@7: //char *paramBagToString( ParamBag * bag ); Me@7: ParamStruc *makeParamStruc(); Me@7: ParamStruc *makeParamFromStrs( char * type, char *value ); Me@7: ssize_t getline( char **lineptr, size_t *n, FILE *stream ); Me@7: Me@7: #endif /* _PARAM_H */ Me@7: