Improved detection of deprecated tokens

This commit is contained in:
Stefanos A 2013-11-03 17:58:28 +01:00
parent 6f08995963
commit 346547331a
2 changed files with 1038 additions and 1372 deletions

File diff suppressed because it is too large Load diff

View file

@ -153,9 +153,15 @@ namespace CHeaderToXML
// Add it to all relevant ones.
foreach (var apiname in apinames)
{
if (!APIs.ContainsKey(apiname))
APIs.Add(apiname, new XElement("api", new XAttribute("name", apiname)));
var api = APIs[apiname];
var key = apiname + version;
if (!APIs.ContainsKey(key))
APIs.Add(
key,
new XElement(
"api",
new XAttribute("name", apiname),
String.IsNullOrEmpty(version) ? null : new XAttribute("version", version)));
var api = APIs[key];
var enum_name = TrimName(feature.Attribute("name").Value);
@ -188,9 +194,9 @@ namespace CHeaderToXML
api.Add(e);
}
foreach (var apiname in apinames)
foreach (var api in APIs.Values)
{
var api = APIs[apiname];
var apiname = api.Attribute("name").Value;
// Mark deprecated enums
foreach (var token in feature.Elements("remove").Elements("enum"))