Mercurial > cgi-bin > hgwebdir.cgi > PR > PR_Implementations > PR__Univ > PR__includes > PR__include
diff prparam.h @ 20:f3cb11baf791
Fully working longjmp, get_sched based. Also OS Portability work included.
Related library_proto-runtime commit: 45dc6d5afb2d
| author | Philipe Louchtch |
|---|---|
| date | Fri, 09 May 2014 11:19:53 +0200 |
| parents | d460a47ed2d6 |
| children |
line diff
1.1 --- a/prparam.h Tue Mar 04 12:45:08 2014 -0800 1.2 +++ b/prparam.h Fri May 09 11:19:53 2014 +0200 1.3 @@ -1,59 +1,59 @@ 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__include/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 - 1.63 +/* 1.64 + * 1.65 + * Author: SeanHalle@yahoo.com 1.66 + * 1.67 + * Created on November 19, 2009, 6:30 PM 1.68 + */ 1.69 + 1.70 +#ifndef _PARAM_H 1.71 +#define _PARAM_H 1.72 + 1.73 +#include <PR__include/PR__primitive_data_types.h> 1.74 + 1.75 + 1.76 +typedef 1.77 +struct 1.78 + { int type; 1.79 + int intValue; 1.80 + char * strValue; 1.81 + float floatValue; 1.82 + } 1.83 +ParamStruc; 1.84 + 1.85 +#define INT_PARAM_TYPE 0 1.86 +#define STRING_PARAM_TYPE 1 1.87 +#define FLOAT_PARAM_TYPE 2 1.88 + 1.89 +#define PARAM_BAG_HASHSIZE 1024 1.90 + 1.91 +typedef struct _ParamBagHashEntry ParamBagHashEntry; 1.92 + 1.93 +struct _ParamBagHashEntry 1.94 + { 1.95 + char *key; 1.96 + ParamStruc *param; 1.97 + struct _ParamBagHashEntry *next; 1.98 + } 1.99 +/*ParamBagHashEntry*/; 1.100 + 1.101 + 1.102 +typedef 1.103 +struct 1.104 + { int bagSz; 1.105 + ParamBagHashEntry* *entries; 1.106 + } 1.107 +ParamBag; 1.108 + 1.109 + 1.110 +ParamBag *makeParamBag(); 1.111 +void readParamFileIntoBag( char *paramFileName, ParamBag * bag ); 1.112 +ParamStruc *getParamFromBag( char *key, ParamBag * bag ); 1.113 +int addParamToBag( char* key, ParamStruc *param, ParamBag *bag ); 1.114 +void freeParamBag( ParamBag *bag ); 1.115 +//char *paramBagToString( ParamBag * bag ); 1.116 +ParamStruc *makeParamStruc(); 1.117 +ParamStruc *makeParamFromStrs( char * type, char *value ); 1.118 +ssize_t getline( char **lineptr, size_t *n, FILE *stream ); 1.119 + 1.120 +#endif /* _PARAM_H */ 1.121 +
