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
00030
00040 #ifndef CASE_CONT_H
00041 #define CASE_CONT_H
00042
00043 #include "../comp_defs.h"
00044
00045 #define TH_CASE \
00046 switch(LOWER_DWORD(val)) { \
00047 case _th12_: \
00048 hdr->type = HDR_CONTENTLENGTH_T; \
00049 hdr->name.len = 14; \
00050 return (p + 4); \
00051 } \
00052 \
00053 if (LOWER_BYTE(*p) == 't') { \
00054 p++; \
00055 if (LOWER_BYTE(*p) == 'h') { \
00056 hdr->type = HDR_CONTENTLENGTH_T;\
00057 p++; \
00058 goto dc_end; \
00059 } \
00060 }
00061
00062
00063 #define ion_CASE \
00064 switch(LOWER_DWORD(val)) { \
00065 case _ion1_: \
00066 hdr->type = HDR_CONTENTDISPOSITION_T; \
00067 hdr->name.len = 19; \
00068 return (p + 4); \
00069 \
00070 case _ion2_: \
00071 hdr->type = HDR_CONTENTDISPOSITION_T; \
00072 p += 4; \
00073 goto dc_end; \
00074 }
00075
00076
00077 #define DISPOSITION_CASE \
00078 switch(LOWER_DWORD(val)) { \
00079 case _osit_: \
00080 p += 4; \
00081 val = READ(p); \
00082 ion_CASE; \
00083 goto other; \
00084 }
00085
00086
00087 #define ENCODING_CASE \
00088 switch(LOWER_DWORD(val)) { \
00089 case _ding_: \
00090 p += 4; \
00091 hdr->type = HDR_CONTENTENCODING_T; \
00092 goto dc_end; \
00093 }
00094
00095 #define CONTENT_CASE \
00096 switch(LOWER_DWORD(val)) { \
00097 case _leng_: \
00098 p += 4; \
00099 val = READ(p); \
00100 TH_CASE; \
00101 goto other; \
00102 \
00103 case _type_: \
00104 hdr->type = HDR_CONTENTTYPE_T; \
00105 p += 4; \
00106 goto dc_end; \
00107 \
00108 case _disp_: \
00109 p += 4; \
00110 val = READ(p); \
00111 DISPOSITION_CASE; \
00112 goto other; \
00113 case _enco_: \
00114 p += 4; \
00115 val = READ(p); \
00116 ENCODING_CASE; \
00117 goto other; \
00118 }
00119
00120
00121 #define ACT_ENT_CASE \
00122 switch(LOWER_DWORD(val)) { \
00123 case _act1_: \
00124 hdr->type = HDR_CONTACT_T; \
00125 hdr->name.len = 7; \
00126 return (p + 4); \
00127 \
00128 case _act2_: \
00129 hdr->type = HDR_CONTACT_T; \
00130 p += 4; \
00131 goto dc_end; \
00132 \
00133 case _ent__: \
00134 p += 4; \
00135 val = READ(p); \
00136 CONTENT_CASE; \
00137 goto other; \
00138 }
00139
00140 #define cont_CASE \
00141 p += 4; \
00142 val = READ(p); \
00143 ACT_ENT_CASE; \
00144 goto other;
00145
00146
00147 #endif