00001 #if !defined(_DICTSTR_H_)
00002 #define _DICTSTR_H_
00003
00004
00005 #ifdef __cplusplus
00006 extern "C" {
00007 #endif
00008
00009 #define FV_SIZEOF_ARRAY(arr) (sizeof(arr)/sizeof((arr)[0]))
00010
00011 typedef struct tagChrDict{
00012 int key;
00013 char chr;
00014 } ChrDict;
00015
00016 typedef struct tagStrDict{
00017 int key;
00018 const char *string;
00019 } StrDict;
00020
00021 extern const char* getString(const StrDict* table,unsigned int size,int key);
00022 extern int getStrKey(const StrDict *table,unsigned int size,const char *str);
00023
00024
00025 typedef struct tagErrDict{
00026 int key;
00027 unsigned char errlevel;
00028 char* description;
00029 } ErrDict;
00030
00031 extern const char* getDescription(const ErrDict *table,unsigned int size,int key);
00032 extern int getKey(const ErrDict *table,unsigned int size,const char *str);
00033 extern unsigned char getErrLevel(const ErrDict *table,unsigned int size,int key);
00034
00035 typedef unsigned long int ulint_t;
00036
00037
00038 #ifdef __cplusplus
00039 }
00040 #endif
00041
00042 #endif
00043