Mercurial > cgi-bin > hgwebdir.cgi > VMS > C_Libraries > ParamHelper
changeset 21:5837ad792168 Univ_dev
updated include paths
| author | Sean Halle <seanhalle@yahoo.com> |
|---|---|
| date | Fri, 20 Sep 2013 00:03:14 -0700 |
| parents | 756969c89fe7 |
| children | 943e99459739 |
| files | Param.h ParamBag.c ReadParamsFromFile.c prparam.h |
| diffstat | 4 files changed, 63 insertions(+), 63 deletions(-) [+] |
line diff
1.1 --- a/Param.h Tue Jul 23 07:41:48 2013 -0700 1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 1.3 @@ -1,59 +0,0 @@ 1.4 -/* 1.5 - * 1.6 - * Author: SeanHalle@yahoo.com 1.7 - * 1.8 - * Created on November 19, 2009, 6:30 PM 1.9 - */ 1.10 - 1.11 -#ifndef _PARAM_H 1.12 -#define _PARAM_H 1.13 - 1.14 -#include "PR__common_includes/PR__primitive_data_types.h" 1.15 - 1.16 - 1.17 -typedef 1.18 -struct 1.19 - { int type; 1.20 - int intValue; 1.21 - char * strValue; 1.22 - float floatValue; 1.23 - } 1.24 -ParamStruc; 1.25 - 1.26 -#define INT_PARAM_TYPE 0 1.27 -#define STRING_PARAM_TYPE 1 1.28 -#define FLOAT_PARAM_TYPE 2 1.29 - 1.30 -#define PARAM_BAG_HASHSIZE 1024 1.31 - 1.32 -typedef struct _ParamBagHashEntry ParamBagHashEntry; 1.33 - 1.34 -struct _ParamBagHashEntry 1.35 - { 1.36 - char *key; 1.37 - ParamStruc *param; 1.38 - struct _ParamBagHashEntry *next; 1.39 - } 1.40 -/*ParamBagHashEntry*/; 1.41 - 1.42 - 1.43 -typedef 1.44 -struct 1.45 - { int bagSz; 1.46 - ParamBagHashEntry* *entries; 1.47 - } 1.48 -ParamBag; 1.49 - 1.50 - 1.51 -ParamBag *makeParamBag(); 1.52 -void readParamFileIntoBag( char *paramFileName, ParamBag * bag ); 1.53 -ParamStruc *getParamFromBag( char *key, ParamBag * bag ); 1.54 -int addParamToBag( char* key, ParamStruc *param, ParamBag *bag ); 1.55 -void freeParamBag( ParamBag *bag ); 1.56 -//char *paramBagToString( ParamBag * bag ); 1.57 -ParamStruc *makeParamStruc(); 1.58 -ParamStruc *makeParamFromStrs( char * type, char *value ); 1.59 -ssize_t getline( char **lineptr, size_t *n, FILE *stream ); 1.60 - 1.61 -#endif /* _PARAM_H */ 1.62 -
2.1 --- a/ParamBag.c Tue Jul 23 07:41:48 2013 -0700 2.2 +++ b/ParamBag.c Fri Sep 20 00:03:14 2013 -0700 2.3 @@ -13,8 +13,8 @@ 2.4 #include <stdio.h> 2.5 #include <stdlib.h> 2.6 2.7 -#include "Param.h" 2.8 -#include "PR__common_includes/Services_offered_by_PR/Memory_Handling/vmalloc__wrapper_library.h" 2.9 +#include <PR__include/prparam.h> 2.10 +#include <PR__include/prmalloc.h> 2.11 2.12 void freeParamStruc( ParamStruc * param ); 2.13 void freeParamBagHashEntry( ParamBagHashEntry *entry );
3.1 --- a/ReadParamsFromFile.c Tue Jul 23 07:41:48 2013 -0700 3.2 +++ b/ReadParamsFromFile.c Fri Sep 20 00:03:14 2013 -0700 3.3 @@ -8,8 +8,8 @@ 3.4 #include <stdlib.h> 3.5 #include <string.h> 3.6 3.7 -#include "Param.h" 3.8 -#include "PR__common_includes/Services_offered_by_PR/Memory_Handling/vmalloc__wrapper_library.h" 3.9 +#include <PR__include/prparam.h> 3.10 +#include <PR__include/prmalloc.h> 3.11 3.12 ParamStruc * makeParamFromStrs( char * type, char *value ); 3.13
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/prparam.h Fri Sep 20 00:03:14 2013 -0700 4.3 @@ -0,0 +1,59 @@ 4.4 +/* 4.5 + * 4.6 + * Author: SeanHalle@yahoo.com 4.7 + * 4.8 + * Created on November 19, 2009, 6:30 PM 4.9 + */ 4.10 + 4.11 +#ifndef _PARAM_H 4.12 +#define _PARAM_H 4.13 + 4.14 +#include "PR__common_includes/PR__primitive_data_types.h" 4.15 + 4.16 + 4.17 +typedef 4.18 +struct 4.19 + { int type; 4.20 + int intValue; 4.21 + char * strValue; 4.22 + float floatValue; 4.23 + } 4.24 +ParamStruc; 4.25 + 4.26 +#define INT_PARAM_TYPE 0 4.27 +#define STRING_PARAM_TYPE 1 4.28 +#define FLOAT_PARAM_TYPE 2 4.29 + 4.30 +#define PARAM_BAG_HASHSIZE 1024 4.31 + 4.32 +typedef struct _ParamBagHashEntry ParamBagHashEntry; 4.33 + 4.34 +struct _ParamBagHashEntry 4.35 + { 4.36 + char *key; 4.37 + ParamStruc *param; 4.38 + struct _ParamBagHashEntry *next; 4.39 + } 4.40 +/*ParamBagHashEntry*/; 4.41 + 4.42 + 4.43 +typedef 4.44 +struct 4.45 + { int bagSz; 4.46 + ParamBagHashEntry* *entries; 4.47 + } 4.48 +ParamBag; 4.49 + 4.50 + 4.51 +ParamBag *makeParamBag(); 4.52 +void readParamFileIntoBag( char *paramFileName, ParamBag * bag ); 4.53 +ParamStruc *getParamFromBag( char *key, ParamBag * bag ); 4.54 +int addParamToBag( char* key, ParamStruc *param, ParamBag *bag ); 4.55 +void freeParamBag( ParamBag *bag ); 4.56 +//char *paramBagToString( ParamBag * bag ); 4.57 +ParamStruc *makeParamStruc(); 4.58 +ParamStruc *makeParamFromStrs( char * type, char *value ); 4.59 +ssize_t getline( char **lineptr, size_t *n, FILE *stream ); 4.60 + 4.61 +#endif /* _PARAM_H */ 4.62 +
