diff --git a/parser/case_feat.h b/parser/case_feat.h index db698a772a5..f80b1dad6a9 100644 --- a/parser/case_feat.h +++ b/parser/case_feat.h @@ -23,14 +23,11 @@ #ifndef CASE_FEAT_H #define CASE_FEAT_H -#define feat_CASE \ - switch(LOWER_DWORD(val)) { \ - case _feat_: \ - p += 4; \ - val = READ(p); \ - ure__CASE; \ - goto other; \ - } +#define feat_CASE \ + p += 4; \ + val = READ(p); \ + ure__CASE; \ + goto other; \ #define ure__CASE \ switch(LOWER_DWORD(val)) { \ @@ -41,17 +38,12 @@ goto other; \ } -#define caps_CASE \ - switch(LOWER_DWORD(val)) { \ - case _caps_: \ - p += 4; \ - if (*p == ':') { \ - hdr->type = HDR_FEATURE_CAPS_T; \ - hdr->name.len = 12; \ - return p + 1; \ - } \ - p++; \ - goto dc_cont; \ - } +#define caps_CASE \ + if (LOWER_DWORD(val) == _caps_) { \ + hdr->type = HDR_FEATURE_CAPS_T; \ + hdr->name.len = 12; \ + p += 4; \ + goto dc_cont; \ + } #endif /* CASE_FEAT_H */ diff --git a/parser/case_repl.h b/parser/case_repl.h index 735f2cedd27..c327a1052c8 100644 --- a/parser/case_repl.h +++ b/parser/case_repl.h @@ -23,26 +23,18 @@ #ifndef CASE_REPL_H #define CASE_REPL_H -#define repl_CASE \ - switch(LOWER_DWORD(val)) { \ - case _repl_: \ - p += 4; \ - val = READ(p); \ - aces_CASE; \ - goto other; \ - } +#define repl_CASE \ + p += 4; \ + val = READ(p); \ + aces_CASE; \ + goto other; \ -#define aces_CASE \ - switch(LOWER_DWORD(val)) { \ - case _aces_: \ - p += 4; \ - if (*p == ':') { \ - hdr->type = HDR_REPLACES_T; \ - hdr->name.len = 8; \ - return p + 1; \ - } \ - p++; \ - goto dc_cont; \ - } +#define aces_CASE \ + if (LOWER_DWORD(val) == _aces_) { \ + hdr->type = HDR_REPLACES_T; \ + hdr->name.len = 8; \ + p += 4; \ + goto dc_cont; \ + } #endif /* CASE_REPL_H */