case_cont.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef CASE_CONT_H
00030 #define CASE_CONT_H
00031
00032
00033 #define TH_CASE \
00034 switch(LOWER_DWORD(val)) { \
00035 case _th12_: \
00036 hdr->type = HDR_CONTENTLENGTH_T; \
00037 hdr->name.len = 14; \
00038 return (p + 4); \
00039 } \
00040 \
00041 if (LOWER_BYTE(*p) == 't') { \
00042 p++; \
00043 if (LOWER_BYTE(*p) == 'h') { \
00044 hdr->type = HDR_CONTENTLENGTH_T; \
00045 p++; \
00046 goto dc_end; \
00047 } \
00048 }
00049
00050
00051 #define ion_CASE \
00052 switch(LOWER_DWORD(val)) { \
00053 case _ion1_: \
00054 hdr->type = HDR_CONTENTDISPOSITION_T; \
00055 hdr->name.len = 19; \
00056 return (p + 4); \
00057 \
00058 case _ion2_: \
00059 hdr->type = HDR_CONTENTDISPOSITION_T; \
00060 p += 4; \
00061 goto dc_end; \
00062 }
00063
00064
00065 #define DISPOSITION_CASE \
00066 switch(LOWER_DWORD(val)) { \
00067 case _osit_: \
00068 p += 4; \
00069 val = READ(p); \
00070 ion_CASE; \
00071 goto other; \
00072 }
00073
00074
00075 #define CONTENT_CASE \
00076 switch(LOWER_DWORD(val)) { \
00077 case _leng_: \
00078 p += 4; \
00079 val = READ(p); \
00080 TH_CASE; \
00081 goto other; \
00082 \
00083 case _type_: \
00084 hdr->type = HDR_CONTENTTYPE_T; \
00085 p += 4; \
00086 goto dc_end; \
00087 \
00088 case _disp_: \
00089 p += 4; \
00090 val = READ(p); \
00091 DISPOSITION_CASE; \
00092 goto other; \
00093 }
00094
00095
00096 #define ACT_ENT_CASE \
00097 switch(LOWER_DWORD(val)) { \
00098 case _act1_: \
00099 hdr->type = HDR_CONTACT_T; \
00100 hdr->name.len = 7; \
00101 return (p + 4); \
00102 \
00103 case _act2_: \
00104 hdr->type = HDR_CONTACT_T; \
00105 p += 4; \
00106 goto dc_end; \
00107 \
00108 case _ent__: \
00109 p += 4; \
00110 val = READ(p); \
00111 CONTENT_CASE; \
00112 goto other; \
00113 }
00114
00115 #define cont_CASE \
00116 p += 4; \
00117 val = READ(p); \
00118 ACT_ENT_CASE; \
00119 goto other;
00120
00121
00122 #endif