From 23a949dd3265daf0733e74d278d990a76702bcb8 Mon Sep 17 00:00:00 2001 From: Royce Mitchell III Date: Fri, 21 Jan 2005 18:15:10 +0000 Subject: [PATCH] attribute 'first' of must be 'true' or 'false' remove an obsolete comment svn path=/branches/xmlbuildsystem/; revision=13191 --- reactos/ntoskrnl/ntoskrnl.xml | 2 +- reactos/tools/rbuild/XML.cpp | 1 - reactos/tools/rbuild/module.cpp | 13 +++++++++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/reactos/ntoskrnl/ntoskrnl.xml b/reactos/ntoskrnl/ntoskrnl.xml index 01ad2d0ed6f..ad52e3b6a97 100644 --- a/reactos/ntoskrnl/ntoskrnl.xml +++ b/reactos/ntoskrnl/ntoskrnl.xml @@ -29,7 +29,7 @@ - multiboot.S + multiboot.S bios.c brkpoint.c bthread.S diff --git a/reactos/tools/rbuild/XML.cpp b/reactos/tools/rbuild/XML.cpp index 0ffedd01282..e95ecff3a72 100644 --- a/reactos/tools/rbuild/XML.cpp +++ b/reactos/tools/rbuild/XML.cpp @@ -628,7 +628,6 @@ XMLReadFile ( XMLFile& f, XMLElement& head, XMLIncludes& includes, const Path& p XMLElement* XMLLoadInclude ( XMLElement* e, const Path& path, XMLIncludes& includes ) { - // TODO FIXME XMLAttribute* att; att = e->GetAttribute("href",true); assert(att); diff --git a/reactos/tools/rbuild/module.cpp b/reactos/tools/rbuild/module.cpp index e30dbc24884..301180ca9ae 100644 --- a/reactos/tools/rbuild/module.cpp +++ b/reactos/tools/rbuild/module.cpp @@ -111,9 +111,18 @@ Module::ProcessXMLSubElement ( const XMLElement& e, string subpath ( path ); if ( e.name == "file" && e.value.size () > 0 ) { + bool first = false; const XMLAttribute* att = e.GetAttribute ( "first", false ); - File* pFile = new File ( FixSeparator ( path + CSEP + e.value ), - att && atoi(att->value.c_str()) != 0 ); + if ( att ) + { + if ( !stricmp ( att->value.c_str(), "true" ) ) + first = true; + else if ( stricmp ( att->value.c_str(), "false" ) ) + throw InvalidBuildFileException ( + e.location, + "attribute 'first' of element can only be 'true' or 'false'" ); + } + File* pFile = new File ( FixSeparator ( path + CSEP + e.value ), first ); if ( pIf ) pIf->files.push_back ( pFile ); else -- 2.17.1