Added workarounds for typical header defines that should not be present in the generated xml files (e.g. #define WIN32_LEAN_AND_MEAN 1).

This commit is contained in:
the_fiddler 2009-08-15 19:07:11 +00:00
parent 6ec4026a5c
commit f4e80dec64

View file

@ -153,6 +153,15 @@ namespace CHeaderToXML
if (tokens[1].StartsWith("__"))
return acc;
// Check whether this is a known header define like WIN32_LEAN_AND_MEAN
switch (tokens[1])
{
case "WIN32_LEAN_AND_MEAN":
case "APIENTRY":
case "GLAPI":
return acc;
}
acc[acc.Count - 1].Add(new XElement("token",
new XAttribute("name", tokens[1].Substring(Prefix.Length + 1)), // remove prefix
new XAttribute("value", tokens[2])));