00001 #include <jsoc.h>
00002 #include <stdio.h>
00003 #include "timeio.h"
00004 #include "uthash.h"
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 typedef struct keyU {
00016 char *name;
00017 int type;
00018 void *val;
00019 UT_hash_handle hh;
00020 } KEYU;
00021
00022
00023
00024
00025
00026 #define KEYTYP_VOID_U (0)
00027 #define KEYTYP_STRING_U (1)
00028 #define KEYTYP_BYTE_U (-1)
00029 #define KEYTYP_UBYTE_U (-2)
00030 #define KEYTYP_SHORT_U (-3)
00031 #define KEYTYP_USHORT_U (-4)
00032 #define KEYTYP_INT_U (-5)
00033 #define KEYTYP_UINT_U (-6)
00034 #define KEYTYP_LONG_U (-7)
00035 #define KEYTYP_ULONG_U (-8)
00036 #define KEYTYP_UINT64_U (-9)
00037 #define KEYTYP_UINT32_U (-10)
00038 #define KEYTYP_FLOAT_U (-16)
00039 #define KEYTYP_DOUBLE_U (-17)
00040 #define KEYTYP_FILEP_U (-32)
00041 #define KEYTYP_TIME_U (-33)
00042 #define KEYTYP_CMPLX_U (-34)
00043 #define KEYTYP_LAST_U (-256)
00044
00045 #define KEY_MAXSTR (255)
00046
00047
00048
00049
00050
00051 extern void deletekeyU (KEYU **list, char *key);
00052 extern KEYU *findkeyU (KEYU *list, char *key);
00053 extern void freekeylistU (KEYU **list);
00054 extern int getkeytypeU (KEYU *list, char *key);
00055 extern void getkey_anyU (KEYU *list, char *key, void *valptr);
00056 extern char *GETKEY_strU(KEYU *params, char *key);
00057 extern char *getkey_strU (KEYU *list, char *key);
00058 extern FILE *getkey_fileptrU (KEYU *list, char *key);
00059 extern int getkey_byteU (KEYU *list, char *key);
00060 extern int getkey_ubyteU (KEYU *list, char *key);
00061 extern int getkey_shortU (KEYU *list, char *key);
00062 extern int getkey_ushortU (KEYU *list, char *key);
00063 extern int getkey_intU (KEYU *list, char *key);
00064 extern unsigned int getkey_uintU (KEYU *list, char *key);
00065 extern long getkey_longU (KEYU *list, char *key);
00066 extern unsigned long getkey_ulongU (KEYU *list, char *key);
00067 extern uint32_t getkey_uint32U (KEYU *list, char *key);
00068 extern uint64_t getkey_uint64U (KEYU *list, char *key);
00069 extern double getkey_floatU (KEYU *list, char *key);
00070 extern double getkey_doubleU (KEYU *list, char *key);
00071 extern TIME getkey_timeU (KEYU *list, char *key);
00072 extern TIME getkey_time_intervalU(KEYU *params, char *key);
00073 extern int getkey_flagU (KEYU *list, char *key);
00074 extern void keyiterateU (void (*action)(), KEYU *overlist);
00075 extern void delete_keysU (KEYU *inlist, KEYU **fromlist);
00076 extern KEYU *newkeylistU ();
00077 extern void add_keysU (KEYU *inlist, KEYU **tolist);
00078 extern void add_key2keyU (KEY *inlist, KEYU **tolist);
00079 extern void setkey_anyU (KEYU **list, char *key, void *val, int type);
00080 extern void setkey_strU (KEYU **list, char *key, char *val);
00081 extern void setkey_fileptrU (KEYU **list, char *key, FILE *val);
00082 extern void setkey_byteU (KEYU **list, char *key, char val);
00083 extern void setkey_ubyteU (KEYU **list, char *key, unsigned char val);
00084 extern void setkey_shortU (KEYU **list, char *key, short val);
00085 extern void setkey_ushortU (KEYU **list, char *key, unsigned short val);
00086 extern void setkey_intU (KEYU **list, char *key, int val);
00087 extern void setkey_uintU (KEYU **list, char *key, unsigned int val);
00088 extern void setkey_uint32U (KEYU **list, char *key, uint32_t val);
00089 extern void setkey_longU (KEYU **list, char *key, long val);
00090 extern void setkey_ulongU (KEYU **list, char *key, unsigned long val);
00091 extern void setkey_uint64U (KEYU **list, char *key, uint64_t val);
00092 extern void setkey_floatU (KEYU **list, char *key, float val);
00093 extern void setkey_doubleU (KEYU **list, char *key, double val);
00094 extern void setkey_timeU (KEYU **list, char *key, TIME val);
00095
00096 extern char *getkey_overfilenameU(KEYU *params, char *rootkey, char *kind);
00097 extern char *GETKEY_overfilenameU(KEYU *params, char *rootkey, char *kind);
00098 extern char *getkey_infofilenameU(KEYU *params, char *rootkey, char *kind);
00099 extern char *GETKEY_infofilenameU(KEYU *params, char *rootkey, char *kind);