From f4e80dec641967b13e3cbbd24ba236dd4f4a3321 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Sat, 15 Aug 2009 19:07:11 +0000 Subject: [PATCH] Added workarounds for typical header defines that should not be present in the generated xml files (e.g. #define WIN32_LEAN_AND_MEAN 1). --- Source/Converter/CHeaderToXML/ESCLParser.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/Converter/CHeaderToXML/ESCLParser.cs b/Source/Converter/CHeaderToXML/ESCLParser.cs index ca0e2182..35db39c8 100644 --- a/Source/Converter/CHeaderToXML/ESCLParser.cs +++ b/Source/Converter/CHeaderToXML/ESCLParser.cs @@ -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])));