Crossfire Server, Branch 1.12  R12190
re-cmp.h
Go to the documentation of this file.
00001 
00009 #ifndef RE_CMP_H
00010 #define RE_CMP_H
00011 
00012 /*   C o n f i g u r a t i o n
00013  */
00014 
00015 #define SAFE_CHECKS     
00019 #define RE_TOKEN_MAX 64 
00026 /*   D o   n o t   c h a n g e    b e l o w
00027  */
00028 
00029 #ifdef uchar
00030 #    undef uchar
00031 #endif
00032 #ifdef Boolean
00033 #    undef Boolean
00034 #endif
00035 #ifdef True
00036 #    undef True
00037 #endif
00038 #ifdef False
00039 #    undef False
00040 #endif
00041 
00042 #define uchar   unsigned char
00043 #define Boolean uchar
00044 #define True    1       
00045 #define False   0
00046 
00047 typedef enum {
00048     sel_any,            
00049     sel_end,            
00050     sel_single,         
00051     sel_range,          
00052     sel_array,          
00053     sel_not_single,     
00054     sel_not_range       
00055 } selection_type;
00056 
00057 typedef enum {
00058     rep_once,           
00059     rep_once_or_more,   
00060     rep_null_or_once,   
00061     rep_null_or_more    
00062 } repetetion_type;
00063 
00064 typedef struct {
00065     selection_type type;
00066     union {
00067         uchar single;
00068         struct {
00069             uchar low, high;
00070         } range;
00071         Boolean array[UCHAR_MAX];
00072     } u;
00073     repetetion_type repeat;
00074 } selection;
00075 
00076 #endif /* RE_CMP_H */