Revision: 201001
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 18 Jan 2010 21:13:05 +0200
changeset 1 b700e12870ca
parent 0 f58d6ec98e88
child 2 159c4d6269be
child 3 de36cc5e7eac
Revision: 201001 Kit: 201003
aknlayoutcompiler/group/AknLayoutCompiler.mmp
aknlayoutcompiler/group/bld.inf
aknlayoutcompiler/inc/AdaptationLayerTemplate.h
aknlayoutcompiler/inc/Cdl2Lag.h
aknlayoutcompiler/inc/CodeGenConsts.h
aknlayoutcompiler/inc/CoreParser.h
aknlayoutcompiler/inc/FormulaParser.h
aknlayoutcompiler/inc/HtmlParse.h
aknlayoutcompiler/inc/Lay2Cdl.h
aknlayoutcompiler/inc/Lay2LayPerf.h
aknlayoutcompiler/inc/LayCdl2Inst.h
aknlayoutcompiler/inc/LayCdl2InstO.h
aknlayoutcompiler/inc/LayCdlCheck.h
aknlayoutcompiler/inc/LayScale.h
aknlayoutcompiler/inc/LayoutCompilerErr.h
aknlayoutcompiler/inc/LayoutPack.h
aknlayoutcompiler/inc/LayoutParse.h
aknlayoutcompiler/inc/MLAttributesParse.h
aknlayoutcompiler/inc/MLCompCdl2InstO.h
aknlayoutcompiler/inc/MLCompData.h
aknlayoutcompiler/inc/MLCompData2Cdl.h
aknlayoutcompiler/inc/MLCompData2LayPerf.h
aknlayoutcompiler/inc/MLCompDataLayPerfWriter.h
aknlayoutcompiler/inc/MLCompDataParse.h
aknlayoutcompiler/inc/MLEqCompDataParse.h
aknlayoutcompiler/inc/MakeLayConvTest.h
aknlayoutcompiler/inc/MasterLayoutPack.h
aknlayoutcompiler/inc/SaxErrorHandler.h
aknlayoutcompiler/inc/UsefulDefinitions.h
aknlayoutcompiler/inc/WriterBase.h
aknlayoutcompiler/src/AdaptationLayerTemplate.cpp
aknlayoutcompiler/src/AknLayoutCompiler.cpp
aknlayoutcompiler/src/Cdl2Lag.cpp
aknlayoutcompiler/src/CoreParser.cpp
aknlayoutcompiler/src/CppWriter.cpp
aknlayoutcompiler/src/Extract.cpp
aknlayoutcompiler/src/FormulaParser.cpp
aknlayoutcompiler/src/FormulaTree.cpp
aknlayoutcompiler/src/HtmlParse.cpp
aknlayoutcompiler/src/Lay2Cdl.cpp
aknlayoutcompiler/src/Lay2LayPerf.cpp
aknlayoutcompiler/src/LayCdl2Inst.cpp
aknlayoutcompiler/src/LayCdl2InstO.cpp
aknlayoutcompiler/src/LayCdlCheck.cpp
aknlayoutcompiler/src/LayPerfWriter.cpp
aknlayoutcompiler/src/LayScale.cpp
aknlayoutcompiler/src/Layout.cpp
aknlayoutcompiler/src/LayoutConfig.cpp
aknlayoutcompiler/src/LayoutPack.cpp
aknlayoutcompiler/src/LayoutParse.cpp
aknlayoutcompiler/src/LayoutWriter.cpp
aknlayoutcompiler/src/MLAttributesParse.cpp
aknlayoutcompiler/src/MLCompCdl2InstO.cpp
aknlayoutcompiler/src/MLCompData.cpp
aknlayoutcompiler/src/MLCompData2Cdl.cpp
aknlayoutcompiler/src/MLCompData2LayPerf.cpp
aknlayoutcompiler/src/MLCompDataLayPerfWriter.cpp
aknlayoutcompiler/src/MLCompDataParse.cpp
aknlayoutcompiler/src/MLEqCompData.cpp
aknlayoutcompiler/src/MLEqCompData2DHuiML.cpp
aknlayoutcompiler/src/MLEqCompDataParse.cpp
aknlayoutcompiler/src/MasterLayoutPack.cpp
aknlayoutcompiler/src/SaxErrorHandler.cpp
aknlayoutcompiler/src/ZoomLevelNames.cpp
cdlcompiler/group/CdlCompiler.mmp
cdlcompiler/group/bld.inf
cdlcompiler/src/CdlCompiler.cpp
cdlcompilertoolkit/group/CdlCompilerToolkit.mmp
cdlcompilertoolkit/group/bld.inf
cdlcompilertoolkit/src/CdlTkClientHeader.cpp
cdlcompilertoolkit/src/CdlTkInstance.cpp
cdlcompilertoolkit/src/CdlTkParser.cpp
cdlcompilertoolkit/src/CdlTkProcess.cpp
cdlcompilertoolkit/src/CdlTkSyntaxCheck.cpp
cdlcompilertoolkit/src/CdlTkUtil.cpp
cdlcompilertoolkit/src/CdlTkWriteCommonDefs.cpp
cdlcompilertoolkit/src/CdlTkWriteDll.cpp
cdlcompilertoolkit/src/CdlTkWriteInstance.cpp
toollibraries/group/bld.inf
uitools_plat/cdl_api/group/bld.inf
uitools_plat/cdl_api/inc/CdlCompilerToolkit/CdlCompat.h
uitools_plat/cdl_api/inc/CdlCompilerToolkit/CdlTkInterface.h
uitools_plat/cdl_api/inc/CdlCompilerToolkit/CdlTkProcess.h
uitools_plat/cdl_api/inc/CdlCompilerToolkit/CdlTkUtil.h
--- a/aknlayoutcompiler/group/AknLayoutCompiler.mmp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/group/AknLayoutCompiler.mmp	Mon Jan 18 21:13:05 2010 +0200
@@ -23,7 +23,9 @@
 SYSTEMINCLUDE     .
 SYSTEMINCLUDE     ../inc
 SYSTEMINCLUDE   ../../inc
-SYSTEMINCLUDE   ../../inc/arabica
+
+SYSTEMINCLUDE   ../../toollibraries/arabica/include
+SYSTEMINCLUDE   ../../toollibraries/xerces-c/include
 
 MW_LAYER_SYSTEMINCLUDE
 
@@ -31,6 +33,7 @@
 // line builds. STL code generates too many warnings at level 4, but is clean at
 // level 3. Also require RTTI.
 option MSVC /GX /W3 /GR
+option GCC -DXML_LIBRARY
 
 SOURCEPATH      ../src
 
@@ -76,31 +79,35 @@
 source          ZoomLevelNames.cpp
 source          MasterLayoutPack.cpp
 
-#ifndef SBSV2
-  start CW32
-    win32_library /epoc32/release/cwtools/rel/CdlCompilerToolkit.lib
-  end
+// #ifndef SBSV2
+//   start CW32
+//     win32_library /epoc32/release/cwtools/rel/CdlCompilerToolkit.lib
+//   end
 
-  start VC32
-    win32_library /epoc32/release/tools/rel/CdlCompilerToolkit.lib
-  end
-#else 
-  START TOOLS
-    #if defined(CW32) 
-      win32_library /epoc32/release/cwtools/rel/CdlCompilerToolkit.lib
-    #elif defined(VC32)
-      win32_library /epoc32/release/tools/rel/CdlCompilerToolkit.lib
-    #endif
-  END
-#endif
+//   start VC32
+//     win32_library /epoc32/release/tools/rel/CdlCompilerToolkit.lib
+//   end
+// #else 
+//   START TOOLS
+//     #if defined(CW32) 
+//       win32_library /epoc32/release/cwtools/rel/CdlCompilerToolkit.lib
+//     #elif defined(VC32)
+//       win32_library /epoc32/release/tools/rel/CdlCompilerToolkit.lib
+//     #endif
+//   END
+// #endif
 
-start TOOLS
-#ifdef RD_XML_PARSER_TOOLCHAIN
-win32_library /epoc32/release/tools/rel/Arabica.lib
-win32_library /epoc32/release/tools/rel/xerces-c_2.lib
-#endif
-win32_library Advapi32.lib 
-end
+// start TOOLS
+// #ifdef RD_XML_PARSER_TOOLCHAIN
+// win32_library /epoc32/release/tools/rel/Arabica.lib
+// win32_library /epoc32/release/tools/rel/xerces-c_2.lib
+// #endif
+// win32_library Advapi32.lib 
+// end
+
+staticlibrary CdlCompilerToolkit
+staticlibrary arabica
+staticlibrary xerces-c
 
 
 // End of File
--- a/aknlayoutcompiler/group/bld.inf	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/group/bld.inf	Mon Jan 18 21:13:05 2010 +0200
@@ -19,7 +19,7 @@
 #include <platform_paths.hrh>
 
 PRJ_PLATFORMS
-TOOLS CWTOOLS
+TOOLS CWTOOLS TOOLS2
 
 PRJ_EXPORTS
 
@@ -27,7 +27,7 @@
 
 PRJ_MMPFILES
 
-#if	defined(TOOLS) || defined(CWTOOLS)
+#if	defined(TOOLS2) || defined(TOOLS) || defined(CWTOOLS)
 
 /*
  * NOTICE! AknLayoutCompiler is not compiled any more during usual build.
--- a/aknlayoutcompiler/inc/AdaptationLayerTemplate.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/inc/AdaptationLayerTemplate.h	Mon Jan 18 21:13:05 2010 +0200
@@ -25,9 +25,9 @@
 #include "Layout.h"
 using namespace std;
 
-#include <cdlcompilertoolkit/cdltkinterface.h>
-#include <cdlcompilertoolkit/cdltkinstance.h>
-#include <cdlcompilertoolkit/cdltkprocess.h>
+#include <CdlCompilerToolkit/CdlTkInterface.h>
+#include <CdlCompilerToolkit/CdlTkInstance.h>
+#include <CdlCompilerToolkit/CdlTkProcess.h>
 using namespace CdlCompilerToolkit;
 
 
--- a/aknlayoutcompiler/inc/Cdl2Lag.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/inc/Cdl2Lag.h	Mon Jan 18 21:13:05 2010 +0200
@@ -22,7 +22,7 @@
 #include <string>
 #include <vector>
 #include <iosfwd>
-#include <cdlcompilertoolkit/cdltkprocess.h>
+#include <CdlCompilerToolkit/CdlTkProcess.h>
 using namespace CdlCompilerToolkit;
 using namespace std;
 
--- a/aknlayoutcompiler/inc/CodeGenConsts.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/inc/CodeGenConsts.h	Mon Jan 18 21:13:05 2010 +0200
@@ -25,8 +25,8 @@
 // includes
 const string KIncludeLayoutInstanceHeaderScalableDef("#include <aknlayout2scalabledef.h>");
 // directories
-const string KDirEpocSysHeader("\\epoc32\\include\\");
-const string KDirDomainSysHeader("\\epoc32\\include\\platform\\mw\\");
+const string KDirEpocSysHeader("/epoc32/include/");
+const string KDirDomainSysHeader("/epoc32/include/platform/mw/");
 
 // parameter namesy
 const string KParamNameBase("aIndex_");
--- a/aknlayoutcompiler/inc/CoreParser.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/inc/CoreParser.h	Mon Jan 18 21:13:05 2010 +0200
@@ -19,7 +19,6 @@
 
 #include <string>
 #include <vector>
-#include <deque>
 
 class Parser;
 
@@ -35,7 +34,7 @@
 	int iRuleId;
 	int iStart;
 	int iEnd;
-	std::deque<ParseResult> iChildren;
+	std::vector<ParseResult> iChildren;
 	};
 
 
--- a/aknlayoutcompiler/inc/FormulaParser.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/inc/FormulaParser.h	Mon Jan 18 21:13:05 2010 +0200
@@ -20,7 +20,7 @@
 
 #include <string>
 #include <vector>
-#include "coreParser.h"
+#include "CoreParser.h"
 using namespace std;
 
 enum TFormulaParserIds
@@ -46,4 +46,4 @@
 
 ParseResult ParseFormula(const string& aFormula);
 
-#endif
\ No newline at end of file
+#endif
--- a/aknlayoutcompiler/inc/HtmlParse.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/inc/HtmlParse.h	Mon Jan 18 21:13:05 2010 +0200
@@ -24,7 +24,7 @@
 #include <iosfwd>
 #include <vector>
 #include <string>
-#include "layout.h"
+#include "Layout.h"
 using namespace std;
 
 /**
--- a/aknlayoutcompiler/inc/Lay2Cdl.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/inc/Lay2Cdl.h	Mon Jan 18 21:13:05 2010 +0200
@@ -22,10 +22,11 @@
 #include <string>
 #include <vector>
 #include <iosfwd>
+#include <memory>
 #include "Layout.h"
 using namespace std;
 
-#include <cdlcompilertoolkit/cdltkinterface.h>
+#include <CdlCompilerToolkit/CdlTkInterface.h>
 using namespace CdlCompilerToolkit;
 
 
@@ -33,6 +34,7 @@
 *  LayoutToCdl
 *  Generate a CDL interface for a layout
 */
+
 class LayoutToCdl
 	{
 public:
--- a/aknlayoutcompiler/inc/Lay2LayPerf.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/inc/Lay2LayPerf.h	Mon Jan 18 21:13:05 2010 +0200
@@ -25,7 +25,7 @@
 #include "Layout.h"
 using namespace std;
 
-#include <cdlcompilertoolkit/cdltkinterface.h>
+#include <CdlCompilerToolkit/CdlTkInterface.h>
 using namespace CdlCompilerToolkit;
 
 
--- a/aknlayoutcompiler/inc/LayCdl2Inst.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/inc/LayCdl2Inst.h	Mon Jan 18 21:13:05 2010 +0200
@@ -25,9 +25,9 @@
 #include "Layout.h"
 using namespace std;
 
-#include <cdlcompilertoolkit/cdltkinterface.h>
-#include <cdlcompilertoolkit/cdltkinstance.h>
-#include <cdlcompilertoolkit/cdltkprocess.h>
+#include <CdlCompilerToolkit/CdlTkInterface.h>
+#include <CdlCompilerToolkit/CdlTkInstance.h>
+#include <CdlCompilerToolkit/CdlTkProcess.h>
 using namespace CdlCompilerToolkit;
 
 
--- a/aknlayoutcompiler/inc/LayCdl2InstO.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/inc/LayCdl2InstO.h	Mon Jan 18 21:13:05 2010 +0200
@@ -25,13 +25,14 @@
 #include "Layout.h"
 using namespace std;
 
-#include <cdlcompilertoolkit/cdltkinterface.h>
-#include <cdlcompilertoolkit/cdltkinstance.h>
-#include <cdlcompilertoolkit/cdltkprocess.h>
+#include <CdlCompilerToolkit/CdlTkInterface.h>
+#include <CdlCompilerToolkit/CdlTkInstance.h>
+#include <CdlCompilerToolkit/CdlTkProcess.h>
 using namespace CdlCompilerToolkit;
 
 class CLayoutInstOpt;
 class CLayoutInstOptImpl;
+
 typedef vector<CLayoutInstOptImpl*> CLayoutInstOptImpls;
 
 /**
--- a/aknlayoutcompiler/inc/LayCdlCheck.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/inc/LayCdlCheck.h	Mon Jan 18 21:13:05 2010 +0200
@@ -25,9 +25,9 @@
 #include "Layout.h"
 using namespace std;
 
-#include <cdlcompilertoolkit/cdltkinterface.h>
-#include <cdlcompilertoolkit/cdltkinstance.h>
-#include <cdlcompilertoolkit/cdltkprocess.h>
+#include <CdlCompilerToolkit/CdlTkInterface.h>
+#include <CdlCompilerToolkit/CdlTkInstance.h>
+#include <CdlCompilerToolkit/CdlTkProcess.h>
 using namespace CdlCompilerToolkit;
 
 /**
--- a/aknlayoutcompiler/inc/LayScale.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/inc/LayScale.h	Mon Jan 18 21:13:05 2010 +0200
@@ -25,7 +25,7 @@
 #include "Layout.h"
 using namespace std;
 
-#include <cdlcompilertoolkit/cdltkinterface.h>
+#include <CdlCompilerToolkit/CdlTkInterface.h>
 using namespace CdlCompilerToolkit;
 
 
--- a/aknlayoutcompiler/inc/LayoutCompilerErr.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/inc/LayoutCompilerErr.h	Mon Jan 18 21:13:05 2010 +0200
@@ -22,7 +22,7 @@
 
 #include <iosfwd>
 #include <string>
-#include <cdlcompilertoolkit/cdltkutil.h>
+#include <CdlCompilerToolkit/CdlTkUtil.h>
 using namespace CdlCompilerToolkit;
 using namespace std;
 
--- a/aknlayoutcompiler/inc/LayoutPack.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/inc/LayoutPack.h	Mon Jan 18 21:13:05 2010 +0200
@@ -24,9 +24,9 @@
 #include <iosfwd>
 using namespace std;
 
-#include <cdlcompilertoolkit/cdltkinterface.h>
-#include <cdlcompilertoolkit/cdltkinstance.h>
-#include <cdlcompilertoolkit/cdltkprocess.h>
+#include <CdlCompilerToolkit/CdlTkInterface.h>
+#include <CdlCompilerToolkit/CdlTkInstance.h>
+#include <CdlCompilerToolkit/CdlTkProcess.h>
 using namespace CdlCompilerToolkit;
 
 /**
--- a/aknlayoutcompiler/inc/LayoutParse.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/inc/LayoutParse.h	Mon Jan 18 21:13:05 2010 +0200
@@ -26,6 +26,7 @@
 #include <iosfwd>
 #include "LayoutCompilerErr.h"
 #include "Layout.h"
+#include <memory>
 using namespace std;
 
 
--- a/aknlayoutcompiler/inc/MLAttributesParse.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/inc/MLAttributesParse.h	Mon Jan 18 21:13:05 2010 +0200
@@ -48,7 +48,7 @@
 class MSaxLayoutAttributesHandler
 	{
 public:
-	typedef SAX::basic_Attributes<std::string> TAttribs; // this is XML Attribs, not to be confused with layout attibutes!
+	typedef Arabica::SAX::Attributes<std::string> TAttribs; // this is XML Attribs, not to be confused with layout attibutes!
 	virtual MSaxLayoutAttributesHandler* HandleSax(const std::string& aElement, const TAttribs& aAttribs) { return this; };
 	virtual void HandleSaxEnd(const std::string& aElement) { };
 	};
@@ -95,18 +95,18 @@
 /**
  * this is the main SAX parser implementation
  */
-class TLayoutAttributesSaxParser : private SAX::basic_DefaultHandler<std::string>
+class TLayoutAttributesSaxParser : private Arabica::SAX::DefaultHandler<std::string>
 	{
 private:
 	typedef stack<MSaxLayoutAttributesHandler*> TSaxAttributesHandlerStack;
-	typedef SAX::basic_ErrorHandler<std::string>::SAXParseExceptionT TException;
+	typedef Arabica::SAX::ErrorHandler<std::string>::SAXParseExceptionT TException;
 
 public:
 	TLayoutAttributesSaxParser(MSaxLayoutAttributesHandler* aHandler);
 	void Parse(const std::string& aFileName);
 
 private: // from basic_DefaultHandler
-	void startElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName, const SAX::basic_Attributes<std::string>& atts);
+	void startElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName, const Arabica::SAX::Attributes<std::string>& atts);
 	void endElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName);
 
 	void warning(const TException& aException);
--- a/aknlayoutcompiler/inc/MLCompCdl2InstO.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/inc/MLCompCdl2InstO.h	Mon Jan 18 21:13:05 2010 +0200
@@ -26,9 +26,9 @@
 #include "MLAttributes.h"
 using namespace std;
 
-#include <cdlcompilertoolkit/cdltkinterface.h>
-#include <cdlcompilertoolkit/cdltkinstance.h>
-#include <cdlcompilertoolkit/cdltkprocess.h>
+#include <CdlCompilerToolkit/CdlTkInterface.h>
+#include <CdlCompilerToolkit/CdlTkInstance.h>
+#include <CdlCompilerToolkit/CdlTkProcess.h>
 using namespace CdlCompilerToolkit;
 
 // forward declares and typedefs
--- a/aknlayoutcompiler/inc/MLCompData.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/inc/MLCompData.h	Mon Jan 18 21:13:05 2010 +0200
@@ -251,8 +251,6 @@
 	TMLCompDataLine* iLine; // not owned
 	};
 
-
-
 /**
 *  TMLCompDataTable 
 *  A layout table
--- a/aknlayoutcompiler/inc/MLCompData2Cdl.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/inc/MLCompData2Cdl.h	Mon Jan 18 21:13:05 2010 +0200
@@ -25,7 +25,7 @@
 #include "MLCompData.h"
 using namespace std;
 
-#include <cdlcompilertoolkit/cdltkinterface.h>
+#include <CdlCompilerToolkit/CdlTkInterface.h>
 using namespace CdlCompilerToolkit;
 
 
@@ -59,7 +59,7 @@
 	static string LineApiName(TMLCompDataLine& aLine);
 	static string LineParamLimitsApiName(TMLCompDataLine& aLine);
 private:
-	static string MLCompDataToCdl::ReturnType(TMLCompDataLine& aLine);
+	static string ReturnType(TMLCompDataLine& aLine);
 	static void ReplaceRemovedAPIs(CCdlTkInterface& aInterface, const TMLCompData& aLayout, bool aDeletesAllowed);
 	static void CleanUpAPIComments(CCdlTkInterface& aInterface);
 	static CCdlTkFunctionApi* ProcessFunctionApi(CCdlTkInterface& aInterface, string aReturnType, string aName, bool& aIsNew);
--- a/aknlayoutcompiler/inc/MLCompData2LayPerf.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/inc/MLCompData2LayPerf.h	Mon Jan 18 21:13:05 2010 +0200
@@ -25,7 +25,7 @@
 #include "MLCompData.h"
 using namespace std;
 
-#include <cdlcompilertoolkit/cdltkinterface.h>
+#include <CdlCompilerToolkit/CdlTkInterface.h>
 using namespace CdlCompilerToolkit;
 
 
--- a/aknlayoutcompiler/inc/MLCompDataLayPerfWriter.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/inc/MLCompDataLayPerfWriter.h	Mon Jan 18 21:13:05 2010 +0200
@@ -27,7 +27,7 @@
 
 class TMLCompDataLayPerfWriter;
 
-#include <cdlcompilertoolkit/cdltkinterface.h>
+#include <CdlCompilerToolkit/CdlTkInterface.h>
 using namespace CdlCompilerToolkit;
 
 
--- a/aknlayoutcompiler/inc/MLCompDataParse.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/inc/MLCompDataParse.h	Mon Jan 18 21:13:05 2010 +0200
@@ -52,7 +52,7 @@
 class MSaxLayoutHandler
 	{
 public:
-	typedef SAX::basic_Attributes<std::string> TAttribs;
+	typedef Arabica::SAX::Attributes<std::string> TAttribs;
 	virtual MSaxLayoutHandler* HandleSax(const std::string& aElement, const TAttribs& aAttribs) { return this; };
 	virtual void HandleSaxEnd(const std::string& aElement) { };
 	};
@@ -155,18 +155,18 @@
 	};
 
 
-class TLayoutSaxParser : private SAX::basic_DefaultHandler<std::string>
+class TLayoutSaxParser : private Arabica::SAX::DefaultHandler<std::string>
 	{
 private:
 	typedef stack<MSaxLayoutHandler*> TSaxHandlerStack;
-	typedef SAX::basic_ErrorHandler<std::string>::SAXParseExceptionT TException;
+	typedef Arabica::SAX::ErrorHandler<std::string>::SAXParseExceptionT TException;
 
 public:
 	TLayoutSaxParser(MSaxLayoutHandler* aHandler);
 	void Parse(const std::string& aFileName);
 
 private: // from basic_DefaultHandler
-	void startElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName, const SAX::basic_Attributes<std::string>& atts);
+	void startElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName, const Arabica::SAX::Attributes<std::string>& atts);
 	void endElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName);
 
 	void warning(const TException& aException);
--- a/aknlayoutcompiler/inc/MLEqCompDataParse.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/inc/MLEqCompDataParse.h	Mon Jan 18 21:13:05 2010 +0200
@@ -52,7 +52,7 @@
 class MSaxLayoutEqHandler
 	{
 public:
-	typedef SAX::basic_Attributes<std::string> TAttribs;
+	typedef Arabica::SAX::Attributes<std::string> TAttribs;
 	virtual MSaxLayoutEqHandler* HandleSax(const std::string& aElement, const TAttribs& aAttribs) { return this; };
 	virtual void HandleSaxEnd(const std::string& aElement) { };
 	};
@@ -169,18 +169,18 @@
 	};
 
 
-class TEqLayoutSaxParser : private SAX::basic_DefaultHandler<std::string>
+class TEqLayoutSaxParser : private Arabica::SAX::DefaultHandler<std::string>
 	{
 private:
 	typedef stack<MSaxLayoutEqHandler*> TSaxHandlerStack;
-	typedef SAX::basic_ErrorHandler<std::string>::SAXParseExceptionT TException;
+	typedef Arabica::SAX::ErrorHandler<std::string>::SAXParseExceptionT TException;
 
 public:
 	TEqLayoutSaxParser(MSaxLayoutEqHandler* aHandler);
 	void Parse(const std::string& aFileName);
 
 private: // from basic_DefaultHandler
-	void startElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName, const SAX::basic_Attributes<std::string>& atts);
+	void startElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName, const Arabica::SAX::Attributes<std::string>& atts);
 	void endElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName);
 
 	void warning(const TException& aException);
--- a/aknlayoutcompiler/inc/MakeLayConvTest.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/inc/MakeLayConvTest.h	Mon Jan 18 21:13:05 2010 +0200
@@ -25,9 +25,9 @@
 #include "Layout.h"
 using namespace std;
 
-#include <cdlcompilertoolkit/cdltkinterface.h>
-#include <cdlcompilertoolkit/cdltkinstance.h>
-#include <cdlcompilertoolkit/cdltkprocess.h>
+#include <CdlCompilerToolkit/CdlTkInterface.h>
+#include <CdlCompilerToolkit/CdlTkInstance.h>
+#include <CdlCompilerToolkit/CdlTkProcess.h>
 using namespace CdlCompilerToolkit;
 
 
--- a/aknlayoutcompiler/inc/MasterLayoutPack.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/inc/MasterLayoutPack.h	Mon Jan 18 21:13:05 2010 +0200
@@ -24,9 +24,9 @@
 #include <iosfwd>
 using namespace std;
 
-#include <cdlcompilertoolkit/cdltkinterface.h>
-#include <cdlcompilertoolkit/cdltkinstance.h>
-#include <cdlcompilertoolkit/cdltkprocess.h>
+#include <CdlCompilerToolkit/CdlTkInterface.h>
+#include <CdlCompilerToolkit/CdlTkInstance.h>
+#include <CdlCompilerToolkit/CdlTkProcess.h>
 using namespace CdlCompilerToolkit;
 
 /**
--- a/aknlayoutcompiler/inc/SaxErrorHandler.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/inc/SaxErrorHandler.h	Mon Jan 18 21:13:05 2010 +0200
@@ -25,17 +25,18 @@
 #ifndef __SAXERRORHANDLER_H_
 #define __SAXERRORHANDLER_H_
 
-#include <DOM/SAX2DOM/SAX2DOM.h>
+#include <DOM/SAX2DOM/SAX2DOM.hpp>
+#include <SAX/ErrorHandler.hpp>
 
-class SAXErrorHandler : public SAX::ErrorHandler
+class SAXErrorHandler : public Arabica::SAX::ErrorHandler<std::string>
 	{
 public:
   SAXErrorHandler() { }
   virtual ~SAXErrorHandler() { }
 public: // from SAX::ErrorHandler
-  virtual void warning(const SAX::SAXParseException&);
-  virtual void error(const SAX::SAXParseException&);
-  virtual void fatalError(const SAX::SAXParseException& exception);
+  virtual void warning(const Arabica::SAX::SAXParseException<std::string>&);
+  virtual void error(const Arabica::SAX::SAXParseException<std::string>&);
+  virtual void fatalError(const Arabica::SAX::SAXParseException<std::string>&);
 	};
 
-#endif // __SAXERRORHANDLER_H_
\ No newline at end of file
+#endif // __SAXERRORHANDLER_H_
--- a/aknlayoutcompiler/inc/UsefulDefinitions.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/inc/UsefulDefinitions.h	Mon Jan 18 21:13:05 2010 +0200
@@ -22,5 +22,4 @@
 #define ARRAY_LEN(x) (sizeof(x)/sizeof(*(x)))
 #define ARRAY_END(x) (x+(sizeof(x)/sizeof(*(x))))
 
-
 #endif // USEFULDEFINITIONS_H
--- a/aknlayoutcompiler/inc/WriterBase.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/inc/WriterBase.h	Mon Jan 18 21:13:05 2010 +0200
@@ -18,7 +18,7 @@
 #ifndef WRITERBASE_H
 #define WRITERBASE_H
 
-#include "layout.h"
+#include "Layout.h"
 
 /**
 *  TWriterBase
--- a/aknlayoutcompiler/src/AdaptationLayerTemplate.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/AdaptationLayerTemplate.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -90,7 +90,7 @@
 
 
 AdaptationLayerTemplate::AdaptationLayerTemplate(TLayout& aLayout, CCdlTkInterface& aLayIface, CCdlTkInterface& aScaleIface, CCdlTkInstance& aInstance, string& aExisting)
-: iLayout(aLayout), iLayIface(aLayIface), iScaleIface(aScaleIface), iInstance(aInstance), iExisting(aExisting)
+: iLayIface(aLayIface), iScaleIface(aScaleIface), iLayout(aLayout), iInstance(aInstance), iExisting(aExisting)
 	{
 	}
 
@@ -162,7 +162,7 @@
 
 pair<string,int> AdaptationLayerTemplate::GetApiMatch(const string& aName)
 	{
-	int size = aName.size();
+	//int size = aName.size();
 	CCdlTkApiList& apiList = iScaleIface.ApiList();
 	string bestMatch;
 	int bestScore = 0;
--- a/aknlayoutcompiler/src/AknLayoutCompiler.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/AknLayoutCompiler.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -28,7 +28,7 @@
 #include <vector>
 #include <algorithm>
 #include <iostream>
-#include "extract.h"
+#include "Extract.h"
 #include "LayoutCompilerErr.h"
 #include "Lay2Cdl.h"
 #include "Cdl2Lag.h"
@@ -107,7 +107,7 @@
 		args.erase(args.begin()+1);
 		}
 
-	string& modeName = CdlTkUtil::ToLower(args[1]);
+	string modeName = CdlTkUtil::ToLower(args[1]);
 
 	if (modeName == "extract")
 		{
--- a/aknlayoutcompiler/src/Cdl2Lag.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/Cdl2Lag.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -49,7 +49,7 @@
 	CdlToLag process(lag, lagName);
 	process.Start();
 
-	for (int ii = 3; ii < args.size(); ii++)
+	for (unsigned int ii = 3; ii < args.size(); ii++)
 		{
 		string cdlName = args[ii];
 		CCdlTkCdlFileParser parser(cdlName);
@@ -60,7 +60,7 @@
 	process.Finish();
 
 	lag.close();
-	CdlTkUtil::ExportFile(temp, KDirEpocSysHeader+CdlTkUtil::StripPath(lagName));
+	CdlTkUtil::ExportFile(temp, CdlTkUtil::CurrentDrive()+KDirEpocSysHeader+CdlTkUtil::StripPath(lagName));
 
 	return 0;
 	}
--- a/aknlayoutcompiler/src/CoreParser.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/CoreParser.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -175,7 +175,7 @@
 			{
 			Step& step = stack[i];
 			Step& parent = stack[step.iParent];
-			parent.iResult.iChildren.push_front(step.iResult);
+			parent.iResult.iChildren.insert(0,step.iResult);//push_front
 			if (parent.iResult.iEnd < step.iResult.iEnd)
 				parent.iResult.iEnd = step.iResult.iEnd;
 			}
@@ -196,7 +196,7 @@
 		case EExact:
 			{
 			string match(iMatch);
-			int mLen = match.size();
+			unsigned int mLen = match.size();
 			if (mLen + aPos > aString.size())
 				return EFail;
 			else if (aString.substr(aPos, mLen) != match)
@@ -208,7 +208,7 @@
 
 		case EEos:
 			{
-			if (aPos != aString.size())
+			if (static_cast<unsigned int>( aPos ) != aString.size())
 				return EFail;
 			else
 				step.iResult.iEnd = aPos;
@@ -319,7 +319,7 @@
 	if (res.iChildren.size())
 		{
 		cout << "{ ";
-		for (int i=0; i<res.iChildren.size(); i++)
+		for (unsigned int i=0; i<res.iChildren.size(); i++)
 			DoPrint(res.iChildren[i]);
 		cout << "} ";
 		}
--- a/aknlayoutcompiler/src/CppWriter.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/CppWriter.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -18,11 +18,11 @@
 
 
 #include "CppWriter.h"
-#include "layoutcompilererr.h"
+#include "LayoutCompilerErr.h"
 #include "CodeGenConsts.h"
 #include "UsefulDefinitions.h"
 
-#include <cdlcompilertoolkit/cdltkutil.h>
+#include <CdlCompilerToolkit/CdlTkUtil.h>
 
 #include <fstream>
 #include <algorithm>
@@ -614,7 +614,7 @@
 	BuildLayoutLineTable();
 	CCdlTkFileCleanup temp(iName+".lag");
 	Output(iName+".cpp", iName+".lag", lay);
-	CdlTkUtil::ExportFile(temp, KDirEpocSysHeader+iShortName+".lag");
+	CdlTkUtil::ExportFile(temp, CdlTkUtil::CurrentDrive()+KDirEpocSysHeader+iShortName+".lag");
 	}
 
 void TCppWriter::Output(const string& aCpp, const string& aLag, const string& aLayName)
--- a/aknlayoutcompiler/src/Extract.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/Extract.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -71,7 +71,7 @@
 
 	iDocName = args[2];
 
-	int layoutIndex = 3;
+	unsigned int layoutIndex = 3;
 	if (args[3][0] == '-')
 		{
 		if (args[3].size() < 3 || args[3][1] != 'o')
--- a/aknlayoutcompiler/src/FormulaParser.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/FormulaParser.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -147,4 +147,4 @@
 
 
 	return formulaParser.Parse(aFormula);
-	}
\ No newline at end of file
+	}
--- a/aknlayoutcompiler/src/FormulaTree.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/FormulaTree.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -201,10 +201,10 @@
 FormulaTreeNode::FormulaTreeNode(const FormulaTreeNode& aOther)
 : iSource(aOther.iSource), iStart(aOther.iStart), iLen(aOther.iLen), iType(aOther.iType)
 	{
-	for (int i=0; i<iSubNodes.size(); i++)
+	for (unsigned int i=0; i<iSubNodes.size(); i++)
 		delete iSubNodes[i];
 	iSubNodes.clear();
-	for (int j=0; j<aOther.iSubNodes.size(); j++)
+	for (unsigned int j=0; j<aOther.iSubNodes.size(); j++)
 		iSubNodes.push_back(new FormulaTreeNode(*aOther.iSubNodes[j]));
 	}
 
--- a/aknlayoutcompiler/src/HtmlParse.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/HtmlParse.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -22,6 +22,7 @@
 #include <sstream>
 #include <set>
 #include <algorithm>
+#include <memory>
 using namespace std;
 
 
@@ -33,7 +34,7 @@
 
 string TrimWhiteSpace(const string& aString)
 	{
-	int start = aString.find_first_not_of(WhiteSpace);
+	string::size_type start = aString.find_first_not_of(WhiteSpace);
 	if (start == string::npos)
 		return "";
 	else
@@ -95,7 +96,7 @@
 void THtmlParseLayoutTable::ExtractTitle(const string& aText)
 	{
 	iName = UnHtml(aText);
-	int pos = iName.find_first_not_of("1234567890.\t\r\n ");
+	string::size_type pos = iName.find_first_not_of("1234567890.\t\r\n ");
 	if (pos == string::npos)
 		return;
 	iName = iName.substr(pos);
@@ -209,7 +210,7 @@
 
 int THtmlParseLayoutTable::GetVal(const string& aText, const string& aField)
 	{
-	int pos = aText.find(aField+"=");
+	string::size_type pos = aText.find(aField+"=");
 	if (pos == string::npos)
 		return 0;
 	string val = aText.substr(pos + aField.length() + 1);
@@ -252,7 +253,7 @@
 	if (aText.length()==0)
 		return aText;
 
-	int pos = aText.find_last_not_of(" ,");
+	string::size_type pos = aText.find_last_not_of(" ,");
 	if (pos == string::npos)
 		return "";
 
@@ -516,7 +517,7 @@
 	int lastSpace = -1;
 	int lastNum = -1;
 	
-	for (int i=0; i<cell.length(); i++)
+	for (string::size_type i=0; i<cell.length(); i++)
 		{
 		char c = cell[i];
 		if (c == ',')
@@ -555,13 +556,13 @@
 string THtmlParseLayoutTable::UnHtml(const string& aText)
 	{
 	string str("");
-	for (int i=0; i<aText.size(); i++)
+	for (string::size_type i=0; i<aText.size(); i++)
 		{
 		char c = aText[i];
 		if (c == '&')
 			{
 			string s = aText.substr(i);
-			int pos = s.find(";");
+			string::size_type pos = s.find(";");
 			if (pos != string::npos)
 				{
 				i+=pos;
@@ -588,7 +589,7 @@
 
 char THtmlParseLayoutTable::HtmlChar(const string& aText)
 	{
-	for (int i=0; i<sizeof(gHtmlChars)/sizeof(THtmlChar); i++)
+	for (unsigned int i=0; i<sizeof(gHtmlChars)/sizeof(THtmlChar); i++)
 		{
 		if (aText == gHtmlChars[i].iString)
 			return gHtmlChars[i].iChar;
@@ -634,11 +635,11 @@
 string THtmlParseLayoutTable::ConvertToAknName(const string& aText)
 	{
 	string ret = aText;
-	for (int i=0; i<sizeof(gAknNameConversionTable)/sizeof(SConvertAknName); i++)
+	for (unsigned int i=0; i<sizeof(gAknNameConversionTable)/sizeof(SConvertAknName); i++)
 		{
 		string laf = gAknNameConversionTable[i].iLaf;
 		string akn = gAknNameConversionTable[i].iAkn;
-		int pos;
+		string::size_type pos;
 		while ((pos = ret.find(laf)) != string::npos)
 			{
 			ret.erase(pos, laf.length());
--- a/aknlayoutcompiler/src/Lay2Cdl.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/Lay2Cdl.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -24,7 +24,7 @@
 #include "Lay2Cdl.h"
 #include "LayoutParse.h"
 #include "LayoutCompilerErr.h"
-#include <cdlcompilertoolkit/cdltkprocess.h>
+#include <CdlCompilerToolkit/CdlTkProcess.h>
 #include <fstream>
 #include <iostream>
 #include <algorithm>
--- a/aknlayoutcompiler/src/Lay2LayPerf.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/Lay2LayPerf.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -23,7 +23,7 @@
 #include "Lay2LayPerf.h"
 #include "LayoutParse.h"
 #include "LayoutCompilerErr.h"
-#include <cdlcompilertoolkit/cdltkprocess.h>
+#include <CdlCompilerToolkit/CdlTkProcess.h>
 #include <fstream>
 #include <iostream>
 #include <algorithm>
@@ -64,10 +64,10 @@
 
 
 LayoutToLayPerf::LayoutToLayPerf(const string& aCdlName, TLayout& aSourceLayout, const string& aDestLayoutName)
-:	
-	iCdlName(aCdlName),
+	:	
 	iLayout(aSourceLayout),
-	iDestLayoutName(aDestLayoutName)
+	iDestLayoutName(aDestLayoutName),
+	iCdlName(aCdlName)
 	{
 	}
 
--- a/aknlayoutcompiler/src/LayCdl2Inst.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/LayCdl2Inst.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -92,7 +92,7 @@
 	LayoutAndCdlToCdlInstance process(*iface);
 
 	TLayout* base = NULL;
-	for (int arg = 3; arg < args.size(); arg += 2)
+	for (unsigned int arg = 3; arg < args.size(); arg += 2)
 		{
 		string layoutName = args[arg];
 		string instName = args[arg+1];
@@ -369,7 +369,7 @@
 
 	CCdlTkImplementation& imp = FindImp(apiName);
 	const CCdlTkFunctionApi& api = imp.Api().AsFunc();
-	const CCdlTkApiParams& params = api.Params();
+	//const CCdlTkApiParams& params = api.Params();
 
 	TLayoutLine& line = *aTable[aSubTable[0]];
 	CCdlTkImplementation& lineImp = FindImp(LayoutToCdl::LineApiName(line));
@@ -382,7 +382,7 @@
 		ptrType = lineApi.PointerType();
 	
 	int valid = 0;
-	for (int ii=0; ii<aTable.size(); ii++)
+	for (unsigned int ii=0; ii<aTable.size(); ii++)
 		{
 		if (find(aSubTable.begin(), aSubTable.end(), ii) != aSubTable.end())
 			{
@@ -495,7 +495,7 @@
 void CLayoutToInst::SetFuncLine(CCdlTkImplementation& aImp, TLayoutLine& aLine, const string& aType, const string aOutputOrder[], int aOutputOrderSize, const string& aPreExtra, const string& aPostExtra)
 	{
 	const CCdlTkFunctionApi& api = aImp.Api().AsFunc();
-	const CCdlTkApiParams& params = api.Params();
+	//const CCdlTkApiParams& params = api.Params();
 
 	string asserts;
 	string tables;
--- a/aknlayoutcompiler/src/LayCdl2InstO.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/LayCdl2InstO.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -35,8 +35,8 @@
 #define AKNLAYOUT_DEFINE_BYTECODE(name,byte) const char name = char(byte);
 #include "AknLayoutByteCodes.h"
 
-
-extern string KMultiLine("Multiline_");
+extern string KMultiLine;
+string KMultiLine("Multiline_");
 typedef LayoutProcessArgsErr<LayoutCdlInstanceOpt> LayoutCdlInstanceOptArgsErr;
 
 
@@ -368,7 +368,7 @@
 					{
 					if (maxVal == 0)
 						maxVal = values.size();
-					else if (maxVal != values.size())
+					else if (static_cast<unsigned int>(maxVal) != values.size())
 						throw CdlTkAssert(string("param range mismatch ") + line.Name() + " " + param.Name());
 					cells |= nextCell;
 					}
@@ -464,11 +464,12 @@
 // the data lookup table. These need to be turned into an array by adding declarations
 // and brackets to the first and last implementations. Extra support functions are also
 // added.
-extern string KExtraCpp = "\
+extern string KExtraCpp;
+string KExtraCpp = "\
 #include \"aknlayout2decode.h\"\n\
 namespace $INTERFACE_NS { extern const TUint8 KByteCodedData[]; }\n";
-
-extern string KInitialCpp ="\
+extern string KInitialCpp;
+string KInitialCpp ="\
 extern const TUint16 KDataLookup[$INTERFACE_NS::E_TApiId_TableSize];\n\
 const SImplData KImplData = { KDataLookup, $INTERFACE_NS::KByteCodedData };\n\
 \n\
@@ -548,7 +549,8 @@
 
 #include <avkon.hrh>
 const int KScalableFontIdOffset(0x1000);
-extern SIdToInt gIdToIntTable[] =
+extern SIdToInt gIdToIntTable[];
+SIdToInt gIdToIntTable[] =
 	{
 		{ ELayoutAlignLeft, "ELayoutAlignLeft" },
 		{ ELayoutAlignRight, "ELayoutAlignRight" },
@@ -611,7 +613,7 @@
 
 void CLayoutInstOpt::EncodeValue(vector<char>& aBytes, string aValue)
 	{
-	int pos;
+	string::size_type pos;
 	TranslateValue(aValue);
 
 	if (aValue == "")
@@ -721,7 +723,7 @@
 	LayoutCdlInstanceOpt process(*iface);
 
 	TLayout* base = NULL;
-	for (int arg = 3; arg < args.size(); arg += 2)
+	for (unsigned int arg = 3; arg < args.size(); arg += 2)
 		{
 		string layoutName = args[arg];
 		string instName = args[arg+1];
--- a/aknlayoutcompiler/src/LayCdlCheck.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/LayCdlCheck.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -25,7 +25,7 @@
 #include "LayoutCompilerErr.h"
 #include "LayoutParse.h"
 #include "Lay2Cdl.h"
-#include <cdlcompilertoolkit/cdltkprocess.h>
+#include <CdlCompilerToolkit/CdlTkProcess.h>
 using namespace std;
 using namespace CdlCompilerToolkit;
 
@@ -58,7 +58,7 @@
 	auto_ptr<CCdlTkInterface> xIface(new CCdlTkInterface);
 	CCdlTkApiList& xApiList = xIface->ApiList();
 
-	for (int arg = nextArg; arg < args.size(); arg++)
+	for (unsigned int arg = nextArg; arg < args.size(); arg++)
 		{
 		string fileName = args[arg];
 		if (fileName.size() < 4)
--- a/aknlayoutcompiler/src/LayPerfWriter.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/LayPerfWriter.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -22,7 +22,7 @@
 #include "Layout.h" // for constants
 #include "CodeGenConsts.h"
 
-#include <cdlcompilertoolkit/cdltkutil.h>
+#include <CdlCompilerToolkit/CdlTkUtil.h>
 
 #include <iostream>
 #include <sstream>
@@ -96,7 +96,7 @@
 	out << "\n// Layout MACROs for LAF Table : ";
 	out << iTable.Name() << endl;
 
-	for (int i=0; i<iTable.size(); ++i)
+	for (unsigned int i=0; i<iTable.size(); ++i)
 		{
 		WriteWindowLine(out, *iTable[i]);
 		}
@@ -205,7 +205,7 @@
 	out << "// Layout MACROs for LAF Table : ";
 	out << iTable.Name() << endl;
 
-	for (int i=0; i<iTable.size(); ++i)
+	for (unsigned int i=0; i<iTable.size(); ++i)
 		{
 		WriteTextLine(out, *iTable[i]);
 		}
@@ -255,7 +255,7 @@
 	string ifName(LayoutToCdl::InterfaceName(cdlFileName));
 
 	out << "// function implementations: " << endl;
-	int tableId = 0;
+	unsigned int tableId = 0;
 	for (TLayout::iterator pTab = iLayout.begin(); pTab != iLayout.end(); ++pTab)
 		{
 		TLayPerfTableWriter writer(**pTab, ifName, tableId++);
--- a/aknlayoutcompiler/src/LayScale.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/LayScale.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -23,7 +23,7 @@
 #include "LayScale.h"
 #include "LayoutParse.h"
 #include "LayoutCompilerErr.h"
-#include <cdlcompilertoolkit/cdltkprocess.h>
+#include <CdlCompilerToolkit/CdlTkProcess.h>
 #include <fstream>
 #include <iostream>
 #include <algorithm>
--- a/aknlayoutcompiler/src/Layout.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/Layout.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -109,8 +109,8 @@
 //  TLayoutLine
 
 TLayoutLine::TLayoutLine( TLayoutTable* aTable, int aId )
-:	iTable(aTable), 
-	iId(aId), 
+:	iId(aId), 
+	iTable(aTable), 
 	iIsUnique(true), 
 	iIsMirroredHorizontally(false),
 	iIsMergedIdentical(false)
@@ -309,15 +309,15 @@
 
 
 TLayoutTable::TLayoutTable(TLayout* aTables)
-: iTables(aTables), iType(EUnknownTable), iParent(0), iFirstLineGlobalIndex(-1), iAppend(false), iNoSubTables(false)
+: iType(EUnknownTable), iTables(aTables), iParent(0), iFirstLineGlobalIndex(-1), iAppend(false), iNoSubTables(false)
 	{
 	}
 
 TLayoutTable::TLayoutTable(TLayout* aTables, const TLayoutTable& aOther)
-: iTables(aTables), iType(aOther.iType), iParent(0), 
-  iFirstLineGlobalIndex(aOther.iFirstLineGlobalIndex), 
-  iAppend(aOther.iAppend), iColumnNames(aOther.iColumnNames), iName(aOther.iName),
-  iParentName(aOther.iParentName), iNoSubTables(aOther.iNoSubTables)
+: iColumnNames(aOther.iColumnNames), iType(aOther.iType),
+  iTables(aTables), iName(aOther.iName), iParent(0),
+  iParentName(aOther.iParentName), iFirstLineGlobalIndex(aOther.iFirstLineGlobalIndex),
+  iAppend(aOther.iAppend), iNoSubTables(aOther.iNoSubTables)
 	{
 	for (const_iterator it = aOther.begin(); it != aOther.end(); ++it)
 		push_back(new TLayoutLine(this, **it));
@@ -386,7 +386,7 @@
 				}
 			case TLayout::KMergeModeUnion:
 				{
-				int index = 0;
+				unsigned int index = 0;
 				for (; pNew != aTable.end(); ++pNew)
 					{
 					bool found = false;
@@ -411,7 +411,7 @@
 							}
 						push_back(*pNew);
 						(*pNew)->iTable = this;
-						if ((*pNew)->iId != size())
+						if ( static_cast<unsigned int>( (*pNew)->iId ) != size())
 							iNoSubTables = true;
 						(*pNew)->iId = size();
 						}
--- a/aknlayoutcompiler/src/LayoutConfig.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/LayoutConfig.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -24,7 +24,7 @@
 
 using namespace std;
 
-const string KBuildConfigFile("\\epoc32\\include\\oem\\bldvariant.hrh");
+const string KBuildConfigFile("/epoc32/include/oem/bldvariant.hrh");
 const string KLayoutMacroStart("__LAYOUT");
 
 typedef LayoutProcessArgsErr<LayoutConfig> LayoutConfigArgsErr;
--- a/aknlayoutcompiler/src/LayoutPack.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/LayoutPack.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -60,8 +60,11 @@
 	string& id = args[5];
 
 	for(CZoomLevelNames::iterator pZoomName = zoomLevelNames.begin(); pZoomName != zoomLevelNames.end(); ++pZoomName)
+		{
+		//string zoomName = CdlTkUtil::Replace("\r", "", pZoomName->second);
+		//zoomName = CdlTkUtil::Replace("\n", "", zoomName);
 		Process(name, w, h, id, styleName, deliveryTypeName, priority, appUid, args.begin() + 6, args.end(), pZoomName->second);
-
+		}
 	return 0;
 	}
 
@@ -75,7 +78,7 @@
 	stream << "    The contents of the package." << endl;
 	stream << "  If -z<zoomList> is specified, then instances for zoom factors" << endl;
 	stream << "    (in the form \"n,string\") appearing in the file <zoomList> will be generated, " << endl;
-	stream << "    by replacing the keyword $ZOOM in the package definitions." << endl;
+	stream << "    by replacing the keyword ZOOM in the package definitions." << endl;
 	stream << "  If -s<screenStyleName> is specified, then instances for the appropriate" << endl;
 	stream << "    screen style as found in WSINI.INI will be generated." << endl;
 	stream << "  If -d<deliveryType> is specified then the delivery type will be appended to" << endl;
@@ -100,12 +103,12 @@
 	vector<string>::const_iterator aEnd, 
 	const string& aZoomName)
 	{
-	CCdlTkCdlFileParser parser(KDirDomainSysHeader+KLayoutPackCdlFile);
+	CCdlTkCdlFileParser parser(CdlTkUtil::CurrentDrive()+KDirDomainSysHeader+KLayoutPackCdlFile);
 	auto_ptr<CCdlTkInterface> iface(parser.LoadAndParse(true));
 	CCdlTkPackage pkg(*iface);
 	pkg.TemplateAllImplementations();
 
-	string zoomName = CdlTkUtil::Replace("$ZOOM", aZoomName, aName);
+	string zoomName = CdlTkUtil::Replace("ZOOM", aZoomName, aName);
 	string zoomIdName = "EAknUiZoom" + aZoomName;
 	string styleHash = Hash(aStyleName);
     string priority = CdlTkUtil::IntToString(CdlTkUtil::ParseInt(aPriority));
@@ -145,12 +148,12 @@
 				throw LayoutPackageArgsErr();
 			const string& inst = *aBegin;
 
-			string zoomContent = CdlTkUtil::Replace("$ZOOM", aZoomName, inst);
+			string zoomContent = CdlTkUtil::Replace("ZOOM", aZoomName, inst);
 			pkg.AddExternalContent(zoomContent, dir, dll);
 			}
 		else
 			{
-			string zoomContent = CdlTkUtil::Replace("$ZOOM", aZoomName, arg);
+			string zoomContent = CdlTkUtil::Replace("ZOOM", aZoomName, arg);
 			pkg.AddLocalContent(zoomContent);
 			cout << zoomContent << endl;
 			}
--- a/aknlayoutcompiler/src/LayoutParse.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/LayoutParse.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -246,11 +246,11 @@
 		}
 	layout->iName = layName;
 
-	int pos=0;
+	string::size_type pos=0;
 	bool first = true;
 	while (pos != string::npos)
 		{
-		int next = layName.find('+', pos);
+		string::size_type next = layName.find('+', pos);
 		string name;
 		if (next == string::npos)
 			{
--- a/aknlayoutcompiler/src/LayoutWriter.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/LayoutWriter.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -66,7 +66,7 @@
 	if (iTable.iAppend)
 		out << "\t+" << endl;
 	
-	for (int i=0; i<iTable.size(); ++i)
+	for (unsigned int i=0; i<iTable.size(); ++i)
 		{
 		if (i>0)
 			out << "," << endl;
@@ -126,7 +126,7 @@
 	if (iTable.iAppend)
 		out << "\t+" << endl;
 	
-	for (int i=0; i<iTable.size(); ++i)
+	for (unsigned int i=0; i<iTable.size(); ++i)
 		{
 		if (i>0)
 			out << "," << endl;
--- a/aknlayoutcompiler/src/MLAttributesParse.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/MLAttributesParse.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -25,7 +25,7 @@
 #include "MLAttributesParse.h"
 #include "MLCompDataParse.h" // for converting zoom strings
 
-#include <akndef.hrh> // for logical font ids
+#include <AknDef.hrh> // for logical font ids
 
 #include <sstream>
 #include <fstream>
@@ -140,7 +140,7 @@
 auto_ptr<TMLAttributesParse> TMLAttributesParse::Parse(const string& aLayName)
 	{
 	auto_ptr<TMLAttributesParse> layout(new TMLAttributesParse);
-	int pos=0;
+
 	string layName = aLayName;
 
 	if (layName.size() >= 2 && layName.substr(0,2) == "-m")
@@ -210,15 +210,15 @@
 
 void TLayoutAttributesSaxParser::Parse(const std::string& aFileName)
 	{
-	SAX::basic_InputSource<std::string> is(aFileName);
-	SAX::XMLReader<std::string> parser;
+	Arabica::SAX::InputSource<std::string> is(aFileName);
+	Arabica::SAX::XMLReader<std::string> parser;
 	parser.setContentHandler(*this);
 	parser.setErrorHandler(*this);
 	parser.parse(is);
 	}
 
 void TLayoutAttributesSaxParser::startElement(const std::string& /*namespaceURI*/, const std::string& localName,
-                              const std::string& /*qName*/, const SAX::basic_Attributes<std::string>& atts)
+                              const std::string& /*qName*/, const Arabica::SAX::Attributes<std::string>& atts)
     {
 	MSaxLayoutAttributesHandler* handler = iStack.top();
 	if (!handler)
--- a/aknlayoutcompiler/src/MLCompCdl2InstO.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/MLCompCdl2InstO.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -35,7 +35,7 @@
 #include "CodeGenConsts.h"
 #include "UsefulDefinitions.h"
 
-#include <akndef.hrh>
+#include <AknDef.hrh>
 
 #include <fstream>
 #include <algorithm>
@@ -67,7 +67,7 @@
 const string KTheWordBlank("blank");
 const string KParentRelativeMarker("Pp");
 const string KCellNameJustification("J");
-const string KCompDataFileNameSuffix("compData");
+const string KCompDataFileNameSuffix("compdata");
 const string KAttributesFileNameSuffix("attributes");
 
 // this is the addressable area for each instance, as the lookup table is 16bit
@@ -101,10 +101,11 @@
 
 	SCompDataImplFunc(TFuncType aType, string aDefn, string aPtrRef, CCdlTkApiParams& aParams)
 		: 
-		iType(aType), 
+		iType(aType),
+		iParams(aParams),
 		iDefn(aDefn), 
-		iPtrRef(aPtrRef),
-		iParams(aParams)
+		iPtrRef(aPtrRef)
+		
 		{
 			
 		}
@@ -122,10 +123,10 @@
 		{
 		if(iType != aType) 
 			return false;
-		int size = iParams.size();
+		unsigned int size = iParams.size();
 		if(size != aParams.size())
 			return false;
-		for(int ii = 0; ii < size; ii++)
+		for(unsigned int ii = 0; ii < size; ii++)
 			{
 			CCdlTkApiParam& thisParam = iParams[ii];
 			CCdlTkApiParam& otherParam = aParams[ii];
@@ -162,7 +163,7 @@
 *  This is a collection of all SCompDataImplFunc objects that a layout instance needs, initialised
 *  so that there are up to four integer parameters per API type.
 */
-CAllCompDataFuncs gTheFuncs;
+CAllCompDataFuncs gTheCompDataFuncs;
 
 //
 // CAllCompDataFuncs
@@ -210,9 +211,9 @@
 	for(set< Seq >::iterator pPattern = subPatterns.begin(); pPattern != subPatterns.end(); ++pPattern)
 		{
 		CCdlTkApiParams params;
-		for(Seq::iterator pParam = pPattern->begin(); pParam != pPattern->end(); ++pParam)
+		for(Seq::const_iterator pParam = pPattern->begin(); pParam != pPattern->end(); ++pParam)
 			{
-			int& param = (*pParam);
+			int param = (*pParam);
 			string name = paramNames[param];
 			params.push_back(CCdlTkApiParam(KTypeInt, name));
 			}
@@ -374,8 +375,8 @@
 	TMLCompDataTable::TMLCompDataSubTable* aSubTable, 
 	CCdlTkImplementation* aImpl)
 	:
+	CMLCompDataInstOptImpl(aImpl),
 	iTable(aTable),
-	CMLCompDataInstOptImpl(aImpl),
 	iSubTable(aSubTable)
 	{
 	}
@@ -481,9 +482,9 @@
 	iInstances(aInstances), 
 	iLayout(aLayout),
 	iName(aInstName), 
-	iZoomName(aZoomName), 
+	iZoomName(aZoomName),
+	iInterface(iInstances.Interface()),
 	iZoomLevel(aZoomLevel),
-	iInterface(iInstances.Interface()),
 	iAllParams(aAllParams),
 	iBaseOffset(0)
 	{
@@ -537,7 +538,7 @@
 	delete iInstance;
 	for (CMLCompDataInstOptImpls::iterator pImpl = iImpls.begin(); pImpl != iImpls.end(); ++pImpl)
 		delete *pImpl;
-	for (pImpl = iTableImpls.begin(); pImpl != iTableImpls.end(); ++pImpl)
+	for (CMLCompDataInstOptImpls::iterator pImpl = iTableImpls.begin(); pImpl != iTableImpls.end(); ++pImpl)
 		delete *pImpl;
 	}
 
@@ -550,7 +551,7 @@
 		ProcessLines(**pTab);
 		}
 
-	for (pTab = iLayout->begin(); pTab != iLayout->end(); ++pTab)
+	for (TMLCompData::iterator pTab = iLayout->begin(); pTab != iLayout->end(); ++pTab)
 		{
 		ProcessTables(**pTab);
 		}
@@ -561,7 +562,7 @@
 	// with the correct base offset, the definitions can be updated
 	UpdateLineImpls();
 
-	for (pTab = iLayout->begin(); pTab != iLayout->end(); ++pTab)
+	for (TMLCompData::iterator pTab = iLayout->begin(); pTab != iLayout->end(); ++pTab)
 		{
 		// now that the rest of the data is stable, we can add the tables at the end
 		UpdateTables(**pTab);
@@ -709,7 +710,7 @@
 	if(!CheckByteCodeIndexInRange(aImpl.iByteCodeIndex))
 		throw GeneralErr(aImpl.iName + " in interface " + iInterface.FileName());
 	// the base offset has been updated, so all definitions must be refreshed
-	int adjustedIndex = aImpl.iByteCodeIndex - iBaseOffset;
+	//int adjustedIndex = aImpl.iByteCodeIndex - iBaseOffset;
 	aImpl.iImpl->SetDefinition(DefinitionString(aImpl.iByteCodeIndex, aImpl.iName));
 	UpdateParamLimits(aImpl.iName); 
 	}
@@ -860,7 +861,7 @@
 	// calculate the number of values
 	bool needsHeader = line.NeedsOptions() || line.NeedsCols() || line.NeedsRows();
 	unsigned int nextCellFlag = 1;	// bit flag for the next cell, note it can get bigger than a char
-	for (cell = 0; cell < aOutputOrder.size(); cell++)
+	for (unsigned int cell = 0; cell < aOutputOrder.size(); cell++)
 		{
 		string cellName = aOutputOrder[cell];
 		TMLCompDataValues::TCompDataCellType type = TMLCompDataValues::Type(cellName);
@@ -910,9 +911,9 @@
 
 	bool optimizeVarieties = true;
 	bool optimizeCalcs = true;
-	int numCalcs = 0;
+	unsigned int numCalcs = 0;
 	int* largestParamLimitPtr = max_element(aParamLimitVarieties.begin(), aParamLimitVarieties.end());
-	int largestParamLimit = largestParamLimitPtr != aParamLimitVarieties.end() ? *largestParamLimitPtr : 0;
+	unsigned int largestParamLimit = largestParamLimitPtr != aParamLimitVarieties.end() ? *largestParamLimitPtr : 0;
 	
 	// in the case of there being no calcs at all, we don't want to be optimizing,
 	// in order to avoid wasted flags.
@@ -932,7 +933,7 @@
 		numCalcs = calcs->size();
 		string value;
 		vector<string> foundCalcs; 
-		int paramLimit = aParamLimitVarieties[varietyIndex];
+		unsigned int paramLimit = aParamLimitVarieties[varietyIndex];
 		if(numCalcs == 0)
 			{
 			if(varietyIndex == 0)
@@ -943,7 +944,7 @@
 			}
 		else
 			{
-			for(int index = 0; index < numCalcs; index++)
+			for(unsigned int index = 0; index < numCalcs; index++)
 				{
 				bool needToCheckIndexValidity = !isColRow || (index < paramLimit);
 				value = (*calcs)[index];
@@ -994,7 +995,7 @@
 		// but if we're optimizing the calcs, then we don't want to expand them after all
 		if(!optimizeCalcs)
 			{
-			int optimal = optimizedValues.size();
+			unsigned int optimal = optimizedValues.size();
 			string value = optimal > 0 ? optimizedValues[optimal-1] : string();
 			for(; optimal < largestParamLimit; optimal++)
 				{
@@ -1195,10 +1196,10 @@
 			return func;
 		}
 
-	int count = gTheFuncs.size();
+	int count = gTheCompDataFuncs.size();
 	for (int ii=0; ii<count; ii++)
 		{
-		SCompDataImplFunc* func = &gTheFuncs[ii];
+		SCompDataImplFunc* func = &gTheCompDataFuncs[ii];
 		if(func->IsSimilar(aType, aParams)) 
 			{
 			iFuncs.push_back(func);
@@ -1207,7 +1208,7 @@
 		}
 
 	throw NotFoundErr("implementation function");
-	return gTheFuncs[0];
+	return gTheCompDataFuncs[0];
 	}
 
 void CMLCompDataInstOpt::SetGenericAPI(SCompDataImplFunc::TFuncType aType, const string& aName)
@@ -1411,13 +1412,17 @@
 	nParams--;	// don't count the aLineIndex param
 	SCompDataImplFunc::TFuncType type = SCompDataImplFunc::EWindowTable;
 	TMLCompDataLine::TComponentType subTableType = aTable[aSub[0]]->iType;
-	switch(subTableType)
+//	switch(subTableType)
+//		{
+//		case TMLCompDataLine::ETextComponent:
+//			{
+//			type = SCompDataImplFunc::ETextTable;
+//			break;
+//			}
+//		}
+	if ( TMLCompDataLine::ETextComponent == subTableType )
 		{
-		case TMLCompDataLine::ETextComponent:
-			{
-			type = SCompDataImplFunc::ETextTable;
-			break;
-			}
+		type = SCompDataImplFunc::ETextTable;
 		}
 	CCdlTkFunctionApi& api = const_cast<CCdlTkFunctionApi&>(impl.Api().AsFunc());
 	CCdlTkApiParams& params = api.Params();
@@ -1427,7 +1432,7 @@
 		iAllParams || aSub.iNeedsOption, 
 		iAllParams || aSub.iNeedsCol, 
 		iAllParams || aSub.iNeedsRow);
-	SCompDataImplFunc& func = AddImplFunc(type, params);
+	AddImplFunc(type, params);
 	}
 
 void CMLCompDataInstOpt::AddParamLimits(TMLCompDataLine& aLine, bool aNeedsOptions)
@@ -1519,7 +1524,7 @@
 
 void CMLCompDataInstOpt::EncodeValue(vector<char>& aBytes, string aValue)
 	{
-	int pos = 0;
+	string::size_type pos = 0;
 	TranslateValue(aValue);
 	if (aValue == "")
 		{
@@ -1610,7 +1615,7 @@
 
 void MLCompDataCdlInstanceOpt::ProcessSeparators(vector<string>& args, vector<int>& aSeparators)
 	{
-    for(int arg = 3; arg < args.size(); arg++)
+    for(unsigned int arg = 3; arg < args.size(); arg++)
         {
         if(args[arg] == "-a")
             aSeparators.push_back(arg);
@@ -1623,7 +1628,7 @@
     // check that the distance between each separator is not a multiple of 2 
     // i.e. counting the steps between aSeparators ( sep -> xml -> inst -> sep) is 3 steps
     // i.e. counting the steps between aSeparators ( sep -> xml -> inst -> xml -> inst -> sep) is 5 steps
-    for(int sep = 0; sep < aSeparators.size() - 1; sep++)
+    for(unsigned int sep = 0; sep < aSeparators.size() - 1; sep++)
         {
         int delta = aSeparators[sep+1] - aSeparators[sep]; 
 	    if (delta%2 == 0)
@@ -1659,11 +1664,9 @@
 		string layoutName = aArgs[arg];
 		string instName = aArgs[arg+1];
 		string attribsName = CdlTkUtil::Replace(KCompDataFileNameSuffix, KAttributesFileNameSuffix, layoutName);
-
 		auto_ptr<TMLCompDataParseLayout> layoutParse = TMLCompDataParseLayout::Parse(layoutName);
 		auto_ptr<TMLCompData> layout(layoutParse.get());
 		layoutParse.release();
-
 		auto_ptr<TMLAttributesParse> attribsParse = TMLAttributesParse::Parse(attribsName);
 		auto_ptr<TMLAttributes> attribs(attribsParse.get());
 		attribsParse.release();
@@ -1682,10 +1685,11 @@
 		{
 		bool isMirrored = (count != 0);
 		// first iterate through the layouts, we will generate one instance per layout
-		for(int instIndex = 0; instIndex < aInstances.size(); instIndex++)
+		for(unsigned int instIndex = 0; instIndex < aInstances.size(); instIndex++)
 			{
 			const InstStruct& instStruct = aInstances[instIndex];
-			string targetInstName = instStruct.iInstName;
+			string targetInstName = CdlTkUtil::Replace("\r","",instStruct.iInstName);
+			targetInstName = CdlTkUtil::Replace("\n","",targetInstName);
 			TMLCompData& targetLayout = *(instStruct.iInst);
 			TMLAttributes& targetAttribs = *(instStruct.iAttribs);
 
@@ -1764,7 +1768,7 @@
 		throw MLCompDataCdlInstanceOptArgsErr();
 
 	// check for optional flags
-    int arg = 2;
+    	int arg = 2;
 	bool allParams = false;
 	if (args[arg] == "-allparams")
 		{
@@ -1791,7 +1795,7 @@
     // the separators divide the layout instances that are aggregated together
     vector<int> separators;
 	ProcessSeparators(args, separators);
-    for(int sep = 0; sep < separators.size() - 1; sep++)
+    for(unsigned int sep = 0; sep < separators.size() - 1; sep++)
         {
 		if(!CheckForUsedInstances(instUsedList, zoomLevelNames, args, separators, sep))
 			continue;
@@ -1807,7 +1811,6 @@
 			pMergedLayout = mergedLayouts.erase(pMergedLayout);
 			}
         }
-
 	process.Process();
 	process.WriteInstances();
 	return 0;
@@ -1878,7 +1881,6 @@
 			continue;
 		CMLCompDataInstOpt* firstInstOpt = compDatas[0];
 		cout << "processing instances for zoom level: " << firstInstOpt->ZoomName() << endl;
-
 		string firstInstName = firstInstOpt->Name();
 		for (CCompDatas::iterator pLayout = compDatas.begin(); pLayout != compDatas.end(); ++pLayout)
 			(*pLayout)->Process(firstInstName);
@@ -1887,8 +1889,7 @@
 	}
 
 void MLCompDataCdlInstanceOpt::WriteInstances()
-	{
-	bool found = false;
+	{	bool found = false;
 	for(CCompDataZoomLevelDatas::iterator pZoomLevel = iZoomLevelDatas.begin(); pZoomLevel != iZoomLevelDatas.end(); ++pZoomLevel)
 		{
 		CCompDatas& compDatas = pZoomLevel->second;
--- a/aknlayoutcompiler/src/MLCompData.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/MLCompData.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -26,7 +26,7 @@
 #include "CodeGenConsts.h"
 #include "UsefulDefinitions.h"
 
-#include "Akndef.hrh"
+#include <AknDef.hrh>
 
 #include <set>
 #include <sstream>
@@ -191,7 +191,7 @@
 		int thisSize = size();
 		int numVarieties = iLine->MaxVariety() + 1; // get zero based index
 		int maximum = max(numVarieties, thisSize);
-		int maxMulti;
+		unsigned int maxMulti;
 		switch(TMLCompDataValues::Type(aCellName))
 			{
 			case ECellTypeCol:
@@ -294,21 +294,21 @@
 
 TMLCompDataLine::TMLCompDataLine()
 :	iId(0),
-	iIsUnique(true), 
-	iIsMirroredHorizontally(false),
+	iName(KCompDataUnknown), 
 	iType(EUnknownComponent),
-	iName(KCompDataUnknown),
 	iDrawingOrder(-1),
 	iMaxVariety(0),
 	iParentTable(0),
 	iParentInfo(0),
 	iAttributeInfo(0),
-	iNumCols(1),
-	iNumRows(1),
+	iIsUnique(true),
+	iGlobalIndex(0),
+	iIsMirroredHorizontally(false),
 	iNeedsOptions(false),
 	iNeedsCols(false),
 	iNeedsRows(false),
-	iGlobalIndex(0)
+	iNumCols(1),
+	iNumRows(1)
 	{	
 		
 	}
@@ -445,6 +445,7 @@
 	TMLCompData& data = *(iParentTable->iTables);
 	TMLAttributes& attributes = *(data.iAttributes);
 	int attribId = attributes.iNames[aAttribName];
+
 	if(attribId == 0)
 		throw GeneralErr(string("Attribute name not found: ") + aAttribName);
 	// find out from attribute info which attribute set we need
@@ -850,24 +851,27 @@
 
 TMLCompDataTable::TMLCompDataTable(TMLCompData* aTables)
 	: 
+	iId(0),
 	iTables(aTables), 
-	iParentLine(NULL), 
-	iFirstLineGlobalIndex(-1), 
+	iParentLine(NULL),
+	iNeedsP(false),
+	iNeedsIndex(false),
 	iAppend(false),
-	iId(0),
-	iNeedsP(false),
-	iNeedsIndex(false)
+	iFirstLineGlobalIndex(-1)
 	{
 	}
 
 TMLCompDataTable::TMLCompDataTable(TMLCompData* aTables, const TMLCompDataTable& aOther)
 	: 
-	iTables(aTables), 
+	iId(aOther.iId),
+	iName(aOther.iName),
+	iTables(aTables),
+	iColumnNames(aOther.iColumnNames),
 	iParentLine(NULL), 
-	iFirstLineGlobalIndex(aOther.iFirstLineGlobalIndex), 
-	iAppend(aOther.iAppend), iColumnNames(aOther.iColumnNames), iName(aOther.iName),
 	iParentName(aOther.iParentName),
-  	iId(aOther.iId)
+	iAppend(aOther.iAppend),
+	iFirstLineGlobalIndex(aOther.iFirstLineGlobalIndex)
+
 	{
 	for (const_iterator pLine = aOther.begin(); pLine != aOther.end(); ++pLine)
 		push_back(new TMLCompDataLine(**pLine));
@@ -912,7 +916,7 @@
 		string subTableName = MLCompDataToCdl::SubTableApiName(sub);
 		string subTableLimitsName = MLCompDataToCdl::SubTableLimitsApiName(sub);
 		string paramLimitsName = MLCompDataToCdl::SubTableParamLimtsApiName(sub);
-		TMLCompDataLine& line = *((*this)[0]);
+		
 		// first check the lines for a direct match
 		// then try the param limits instead
 		if (subTableName == aName ||
@@ -1064,13 +1068,11 @@
 
 
 const string KPaneColumnNames[] = {"Item", "C", "l", "t", "r", "b", "W", "H", "Remarks"};
-const string KGraphicColumnNames[] = {"Item", "C", "l", "t", "r", "b", "W", "H", "Remarks"};
-const string KTextColumnNames[] = {"Font", "C", "l", "r", "t", "b", "W", "H", "J", "Remarks"};
 
 void TMLCompDataTable::SetDefaultColumnNames()
 	{
 	iColumnNames.clear();
-	iColumnNames.insert(iColumnNames.end(), KPaneColumnNames, ARRAY_END(KTextColumnNames)); // superset
+    iColumnNames.insert(iColumnNames.end(), KPaneColumnNames, ARRAY_END(KPaneColumnNames));
 	}
 
 TMLCompDataTable::TMLCompDataSubTable::TMLCompDataSubTable()
@@ -1232,7 +1234,7 @@
 				TMLCompDataParentInfoSelector& selector = (parentInfo.begin())->second; // we ignore the varieties for now
 				parentId = selector.iParentId;
 				TMLCompDataTable* parentTable = FindTable(parentId);
-				TMLCompDataLine* parentLine = iComponents[parentId];
+
 				if(parentTable)
 					{
 					line.iParentTable = parentTable;
--- a/aknlayoutcompiler/src/MLCompData2Cdl.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/MLCompData2Cdl.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -23,7 +23,7 @@
 #include "MLCompDataParse.h"
 #include "MLAttributesParse.h"
 #include "LayoutCompilerErr.h"
-#include <cdlcompilertoolkit/cdltkprocess.h>
+#include <CdlCompilerToolkit/CdlTkProcess.h>
 #include <fstream>
 #include <iostream>
 #include <algorithm>
@@ -39,7 +39,7 @@
 const int KGeneratedInterfaceMajorVer = 1;
 const int KGeneratedInterfaceMinorVer = 0;
 
-const string KCompDataFileNameSuffix("compData");
+const string KCompDataFileNameSuffix("compdata");
 const string KAttributesFileNameSuffix("attributes");
 
 
@@ -57,7 +57,7 @@
 	{
 	iInterfaceNamesUsed.clear();
 
-	int numExpectedArgs = 4;
+	unsigned int numExpectedArgs = 4;
 	if(args.size() < numExpectedArgs)
 		throw MLCompDataToCdlArgsErr();
 
@@ -151,7 +151,7 @@
     arg = numExpectedArgs-2; 
 
 	// so that we get a list of processed files to output to the comment
-    for(ii = 0; ii < numLayouts; ii++)
+    for(int ii = 0; ii < numLayouts; ii++)
 		comment << args[arg++] << ", ";
     comment << endl; 
 	comment << "// which was generated with timestamp " << mergedLayout->iTimestamp << endl;
@@ -347,7 +347,7 @@
 	aInterface.Header().SetVersion(CCdlTkInterfaceHeader::CVersion(KGeneratedInterfaceMajorVer, KGeneratedInterfaceMinorVer));
 
 	CCdlTkCpp& cpp = aInterface.Cpp();
-	int size = cpp.size();
+//	int size = cpp.size();
 	if(!find(cpp.begin(), cpp.end(), KIncludeLayoutInstanceHeaderScalableDef))
 		cpp.push_back(KIncludeLayoutInstanceHeaderScalableDef);
 	}
--- a/aknlayoutcompiler/src/MLCompData2LayPerf.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/MLCompData2LayPerf.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -23,7 +23,7 @@
 // disable "decorated name length exceeded, name was truncated"
 #pragma warning (disable:4503)
 
-#include <cdlcompilertoolkit/cdltkprocess.h>
+#include <CdlCompilerToolkit/CdlTkProcess.h>
 #include <fstream>
 #include <iostream>
 #include <algorithm>
@@ -111,10 +111,10 @@
 
 MLCompDataToLayPerf::MLCompDataToLayPerf(const string& aCdlName, CCdlTkInterface& aInterface, TMLCompData& aSourceLayout, const string& aDestLayoutName)
     :	
+	iLayout(aSourceLayout),
+	iDestLayoutName(aDestLayoutName),
 	iCdlName(aCdlName),
-	iInterface(aInterface), 
-	iLayout(aSourceLayout),
-	iDestLayoutName(aDestLayoutName)
+	iInterface(aInterface)
 	{
 	}
 
--- a/aknlayoutcompiler/src/MLCompDataLayPerfWriter.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/MLCompDataLayPerfWriter.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -22,8 +22,8 @@
 #include "LayoutCompilerErr.h"
 #include "CodeGenConsts.h"
 
-#include <cdlcompilertoolkit/cdltkinterface.h>
-#include <cdlcompilertoolkit/cdltkutil.h>
+#include <CdlCompilerToolkit/CdlTkInterface.h>
+#include <CdlCompilerToolkit/CdlTkUtil.h>
 
 #include <iostream>
 #include <sstream>
@@ -88,7 +88,7 @@
 	out << "\n// Layout MACROs for Layout Table : ";
 	out << iTable.Name() << endl;
 
-	for (int i=0; i<iTable.size(); ++i)
+	for (unsigned int i=0; i<iTable.size(); ++i)
 		{
 		WriteLine(out, *iTable[i]);
 		}
@@ -187,8 +187,8 @@
 
 TMLCompDataLayPerfWriter::TMLCompDataLayPerfWriter(CCdlTkInterface& aInterface, TMLCompData& aLayout, const std::string& aName)
 	:
-	iInterface(aInterface), 
-	TMLWriterBase<TMLCompData>(aLayout, aName)
+	TMLWriterBase<TMLCompData>(aLayout, aName),
+	iInterface(aInterface)
 	{
 	}
 
@@ -201,7 +201,7 @@
 	string ifName(iInterface.Header().Name());
 
 	out << "// function implementations: " << endl;
-	int tableId = 0;
+	unsigned int tableId = 0;
 	for (TMLCompData::iterator pTab = iLayout.begin(); pTab != iLayout.end(); ++pTab)
 		{
 		TMLCompDataLayPerfTableWriter writer(this, **pTab, ifName, tableId++);
--- a/aknlayoutcompiler/src/MLCompDataParse.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/MLCompDataParse.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -23,7 +23,7 @@
 
 #include "MLCompDataParse.h"
 
-#include <akndef.hrh>
+#include <AknDef.hrh>
 
 #include <sstream>
 #include <fstream>
@@ -489,7 +489,7 @@
 	string maxVarietyStr = aAttribs.getValue(KCompDataParseNodeComponentAttributeMaxVariety);
 	if(!maxVarietyStr.empty()) // screen doesn't have maxVariety for some reason
 		{
-		int maxVariety = CdlTkUtil::ParseInt(maxVarietyStr) - 2;
+		//int maxVariety = CdlTkUtil::ParseInt(maxVarietyStr) - 2;
 		// we ignore the maxVariety for now, as it will be calculated by parsing the values
 		}
 	}
@@ -694,7 +694,7 @@
 	auto_ptr<TMLCompDataParseLayout> layout(new TMLCompDataParseLayout);
 	int pos=0;
 	string layName = aLayName;
-	int next = layName.find('+', pos);
+	string::size_type next = layName.find('+', pos);
 	if (next != string::npos)
 		{
 		throw GeneralErr(layName + " TMLCompDataParseLayout::Parse() - doesn't support multiple files");
@@ -724,15 +724,15 @@
 
 void TLayoutSaxParser::Parse(const std::string& aFileName)
 	{
-	SAX::basic_InputSource<std::string> is(aFileName);
-	SAX::XMLReader<std::string> parser;
+	Arabica::SAX::InputSource<std::string> is(aFileName);
+	Arabica::SAX::XMLReader<std::string> parser;
 	parser.setContentHandler(*this);
 	parser.setErrorHandler(*this);
 	parser.parse(is);
 	}
 
 void TLayoutSaxParser::startElement(const std::string& /*namespaceURI*/, const std::string& localName,
-                              const std::string& /*qName*/, const SAX::basic_Attributes<std::string>& atts)
+                              const std::string& /*qName*/, const Arabica::SAX::Attributes<std::string>& atts)
     {
 	MSaxLayoutHandler* handler = iStack.top();
 	if (!handler)
--- a/aknlayoutcompiler/src/MLEqCompData.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/MLEqCompData.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -27,7 +27,7 @@
 #include "CodeGenConsts.h"
 #include "UsefulDefinitions.h"
 
-#include "Akndef.hrh"
+#include <AknDef.hrh>
 
 #include <set>
 #include <sstream>
@@ -106,7 +106,7 @@
 	iZoomId(aOther.iZoomId),
 	iFormulaTree(aOther.iFormulaTree)
 	{
-	int x = 0;
+
 	}
 
 const TMLEqCompDataFormula& TMLEqCompDataFormula::operator=(const TMLEqCompDataFormula& aOther)
@@ -322,17 +322,18 @@
 
 TMLEqCompDataLine::TMLEqCompDataLine()
 :	iId(0),
-	iIsUnique(true), 
-	iIsMirroredHorizontally(false),
+	iName(KEqCompDataUnknown),
 	iType(EUnknownComponent),
-	iName(KEqCompDataUnknown),
 	iDrawingOrder(-1),
 	iParentTable(0),
 	iParentInfo(0),
+	iIsUnique(true),
+	iGlobalIndex(0),
+	iIsMirroredHorizontally(false),
 //	iAttributeInfo(0),
 	iNumCols(1),
-	iNumRows(1),
-	iGlobalIndex(0)
+	iNumRows(1)
+
 	{	
 		
 	}
@@ -738,18 +739,18 @@
 
 TMLEqCompDataTable::TMLEqCompDataTable(TMLEqCompData* aTables)
 	: 
+	iId(0),
 	iTables(aTables), 
-	iParentLine(NULL), 
-	iId(0)
+	iParentLine(NULL)
 	{
 	}
 
 TMLEqCompDataTable::TMLEqCompDataTable(TMLEqCompData* aTables, const TMLEqCompDataTable& aOther)
 	: 
+  	iId(aOther.iId),
 	iTables(aTables), 
 	iParentLine(NULL), 
-	iParentName(aOther.iParentName),
-  	iId(aOther.iId)
+	iParentName(aOther.iParentName)
 	{
 	for (const_iterator pOptionSet = aOther.begin(); pOptionSet != aOther.end(); ++pOptionSet)
 		{
@@ -1021,7 +1022,6 @@
 			if(parentId != 0)
 				{
 				TMLEqCompDataTable* parentTable = FindTable(parentId);
-				TMLEqCompDataLine* parentLine = iComponents[parentId];
 				if(parentTable)
 					{
 					line.iParentTable = parentTable;
--- a/aknlayoutcompiler/src/MLEqCompData2DHuiML.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/MLEqCompData2DHuiML.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -24,7 +24,7 @@
 #include "LayoutCompilerErr.h"
 #include "FormulaTree.h"
 
-#include <cdlcompilertoolkit/cdltkprocess.h>
+#include <CdlCompilerToolkit/CdlTkProcess.h>
 
 #include <fstream>
 #include <iostream>
@@ -188,7 +188,7 @@
 	cout << "writing dhuiml file " << dhuimlName << endl;
 	ofstream dhuiml(dhuimlName.c_str());
 
-	int KIndent = 4;
+	//int KIndent = 4;
 	TEqLayoutSaxWriter saxWriter(dhuiml);
 	saxWriter.StartDocument();
 
--- a/aknlayoutcompiler/src/MLEqCompDataParse.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/MLEqCompDataParse.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -23,7 +23,7 @@
 
 #include "MLEqCompDataParse.h"
 
-#include <akndef.hrh>
+#include <AknDef.hrh>
 
 #include <sstream>
 #include <fstream>
@@ -701,15 +701,15 @@
 
 void TEqLayoutSaxParser::Parse(const std::string& aFileName)
 	{
-	SAX::basic_InputSource<std::string> is(aFileName);
-	SAX::XMLReader<std::string> parser;
+	Arabica::SAX::InputSource<std::string> is(aFileName);
+	Arabica::SAX::XMLReader<std::string> parser;
 	parser.setContentHandler(*this);
 	parser.setErrorHandler(*this);
 	parser.parse(is);
 	}
 
 void TEqLayoutSaxParser::startElement(const std::string& /*namespaceURI*/, const std::string& localName,
-                              const std::string& /*qName*/, const SAX::basic_Attributes<std::string>& atts)
+                              const std::string& /*qName*/, const Arabica::SAX::Attributes<std::string>& atts)
     {
 	MSaxLayoutEqHandler* handler = iStack.top();
 	if (!handler)
--- a/aknlayoutcompiler/src/MasterLayoutPack.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/MasterLayoutPack.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -125,7 +125,7 @@
 	stream << "    <layout pack name> <width> <height> <layout variant> <content>*" << endl;
 	stream << "  If -z<zoomList> is specified, then instances for zoom factors" << endl;
 	stream << "  (in the form \"n,string\") appearing in the file <zoomList> will be generated, " << endl;
-	stream << "  by replacing the keyword $ZOOM in the package definitions." << endl;
+	stream << "  by replacing the keyword ZOOM in the package definitions." << endl;
 	}
 
 void MasterLayoutPackage_Process(
@@ -137,12 +137,12 @@
 	vector<string>::const_iterator aEnd, 
 	const string& aZoomName)
 	{
-	CCdlTkCdlFileParser parser(KDirDomainSysHeader+KMasterLayoutPackCdlFile);
+	CCdlTkCdlFileParser parser(CdlTkUtil::CurrentDrive()+KDirDomainSysHeader+KMasterLayoutPackCdlFile);
 	auto_ptr<CCdlTkInterface> iface(parser.LoadAndParse(true));
 	CCdlTkInstance pkg(*iface);
 	pkg.TemplateAllImplementations();
 
-	string zoomName = CdlTkUtil::Replace("$ZOOM", aZoomName, aName);
+	string zoomName = CdlTkUtil::Replace("ZOOM", aZoomName, aName);
 	string zoomIdName = "EAknUiZoom" + aZoomName;
 
 	pkg.SetName(zoomName);
@@ -157,7 +157,7 @@
 
 	for (; aBegin != aEnd; ++aBegin)
 		{
-		string zoomContent = CdlTkUtil::Replace("$ZOOM", aZoomName, *aBegin);
+		string zoomContent = CdlTkUtil::Replace("ZOOM", aZoomName, *aBegin);
 //		pkg.AddLocalContent(zoomContent);
 		cout << zoomContent << endl;
 		}
@@ -204,7 +204,7 @@
 
 void MasterLayoutIndex::CreateTemplateInstance()
 	{
-	CCdlTkCdlFileParser parser(KDirDomainSysHeader+KMasterLayoutPackCdlFile);
+	CCdlTkCdlFileParser parser(CdlTkUtil::CurrentDrive()+KDirDomainSysHeader+KMasterLayoutPackCdlFile);
 	iIface = parser.LoadAndParse(true);
 	iInst = auto_ptr<CCdlTkInstance>(new CCdlTkInstance(*iIface));
 	iInst->TemplateAllImplementations();
@@ -295,13 +295,13 @@
 	string impl = "&";
 	string extra;
 
-	string pkgName = CdlTkUtil::Replace("$ZOOM", aZoom, aLine[EPackNameArg]);
+	string pkgName = CdlTkUtil::Replace("ZOOM", aZoom, aLine[EPackNameArg]);
 	impl+=pkgName;
 
 	string refs;
-	for (int refPos = EFirstContentArg; refPos < aLine.size(); ++refPos)
+	for (unsigned int refPos = EFirstContentArg; refPos < aLine.size(); ++refPos)
 		{
-		string refName = CdlTkUtil::Replace("$ZOOM", aZoom, aLine[refPos]);
+		string refName = CdlTkUtil::Replace("ZOOM", aZoom, aLine[refPos]);
 		CdlTkUtil::AppendString(refs, CdlTkUtil::Replace("$NAME",refName,"\tLOCAL_CDL_REF($NAME),\n"));
 		}
 
--- a/aknlayoutcompiler/src/SaxErrorHandler.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/SaxErrorHandler.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -23,17 +23,17 @@
 
 #include "SaxErrorHandler.h"
 
-void SAXErrorHandler::warning(const SAX::SAXParseException& exception)
+void SAXErrorHandler::warning(const Arabica::SAX::SAXParseException<std::string>& exception)
 {
   std::cerr << "WARNING: " << exception.what() << std::endl;
 } // warning
 
-void SAXErrorHandler::error(const SAX::SAXParseException& exception)
+void SAXErrorHandler::error(const Arabica::SAX::SAXParseException<std::string>& exception)
 {
   std::cerr << "ERROR  : " << exception.what() << std::endl;
 } // error
 
-void SAXErrorHandler::fatalError(const SAX::SAXParseException& exception)
+void SAXErrorHandler::fatalError(const Arabica::SAX::SAXParseException<std::string>& exception)
 {
   std::cerr << "FATAL  : " << exception.what() << std::endl;
 } // fatalError
--- a/aknlayoutcompiler/src/ZoomLevelNames.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/aknlayoutcompiler/src/ZoomLevelNames.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -26,9 +26,9 @@
 #include "LayoutCompilerErr.h"
 #include "CodeGenConsts.h"
 
-#include <cdlcompilertoolkit/cdltkutil.h>
+#include <CdlCompilerToolkit/CdlTkUtil.h>
 
-#include <akndef.hrh>
+#include <AknDef.hrh>
 
 #include <fstream>
 #include <iostream>
@@ -71,7 +71,7 @@
 		while (!in.eof())
 			{
 			getline(in, line);
-			int comma = line.find(",");
+			string::size_type comma = line.find(",");
 			if(comma == string::npos)
 				{
 				cerr << "Zoom file incorrect format." << endl;
--- a/cdlcompiler/group/CdlCompiler.mmp	Thu Dec 17 09:14:18 2009 +0200
+++ b/cdlcompiler/group/CdlCompiler.mmp	Mon Jan 18 21:13:05 2010 +0200
@@ -43,6 +43,8 @@
       win32_library /epoc32/release/tools/rel/CdlCompilerToolkit.lib
     #endif
   END
-#endif   
+#endif  
+
+staticlibrary CdlCompilerToolkit 
 
 // End of File
--- a/cdlcompiler/group/bld.inf	Thu Dec 17 09:14:18 2009 +0200
+++ b/cdlcompiler/group/bld.inf	Mon Jan 18 21:13:05 2010 +0200
@@ -17,15 +17,15 @@
 #include <platform_paths.hrh>
 
 PRJ_PLATFORMS
-TOOLS CWTOOLS
+TOOLS CWTOOLS TOOLS2
 
 PRJ_EXPORTS
 
-../binary/CdlCompiler.EXE /epoc32/tools/CdlCompiler.exe 
+../binary/CdlCompiler.exe /epoc32/tools/CdlCompiler.exe 
 
 PRJ_MMPFILES
 
-#if defined(TOOLS) || defined(CWTOOLS)
+#if defined(TOOLS) || defined(CWTOOLS) || defined(TOOLS2)
 
 /*
  * NOTICE! CdlCompiler is not compiled any more during usual build.
@@ -35,7 +35,7 @@
  * /epoc32/tools/AknLayoutCompiler.exe to ../binary directory and 
  * put the binary to version control.
  */
-//CdlCompiler.mmp
+// CdlCompiler.mmp
 #endif
 
 // End of File
--- a/cdlcompiler/src/CdlCompiler.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/cdlcompiler/src/CdlCompiler.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -22,9 +22,15 @@
 #include <list>
 #include <sstream>
 #include <iomanip>
+#include <memory>
+
+#ifdef __MSVCRT__
 #include <direct.h>
-#include <cdlcompilertoolkit/cdltkutil.h>
-#include <cdlcompilertoolkit/cdltkprocess.h>
+#endif
+
+#include <CdlCompilerToolkit/CdlTkUtil.h>
+#include <CdlCompilerToolkit/CdlTkProcess.h>
+#include <CdlCompilerToolkit/CdlCompat.h>
 using namespace std;
 using namespace CdlCompilerToolkit;
 
@@ -214,7 +220,7 @@
 	if (pArg == aArgs.end())
 		throw MainArgsErr("Missing package instance id");
 
-	if (count_if(pArg->begin(), pArg->end(), CdlTkUtil::IsNumeric) == pArg->size())
+	if (count_if(pArg->begin(), pArg->end(), CdlTkUtil::IsNumeric) == static_cast<signed int>( pArg->size()) )
 		{
 		pckg.SetId(CdlTkUtil::ParseInt(*pArg));
 		++pArg;
@@ -367,12 +373,13 @@
 	{
 public:
 	CCompareModeChecker(const string& aLeft, const string& aRight);
+	virtual ~CCompareModeChecker();
 	virtual void StartCheck();
 	virtual void CheckComplete();
 	virtual void ApiInBoth(const CCdlTkApi& aApi);
 	virtual void ApiNotInLeft(const CCdlTkApi& aApi);
 	virtual void ApiNotInRight(const CCdlTkApi& aApi);
-
+	
 private:
 	int iErrs;
 	string iLeft;
@@ -384,6 +391,11 @@
 	{
 	}
 
+CCompareModeChecker:: ~CCompareModeChecker()
+    {
+
+    }
+
 void CCompareModeChecker::StartCheck()
 	{
 	iErrs = 0;
@@ -569,7 +581,7 @@
 	if (*pArg == "client")
 		{
 		mode = auto_ptr<CCompilerMode>(new CClientMode);
-		CdlTkUtil::SetOutputPath(CdlTkUtil::CurrentDrive() + "\\epoc32\\include\\");
+		CdlTkUtil::SetOutputPath(CdlTkUtil::CurrentDrive() +PATHSEP+"epoc32"+PATHSEP+"include"+PATHSEP);
 		}
 	else if (*pArg == "instance")
 		{
--- a/cdlcompilertoolkit/group/CdlCompilerToolkit.mmp	Thu Dec 17 09:14:18 2009 +0200
+++ b/cdlcompilertoolkit/group/CdlCompilerToolkit.mmp	Mon Jan 18 21:13:05 2010 +0200
@@ -16,13 +16,18 @@
 */
 #include <platform_paths.hrh>
 
+#ifdef TOOLS2
+target                  libCdlCompilerToolkit
+#else 
 target                  CdlCompilerToolkit.lib
+#endif
+
 targettype              LIB
 
-USERINCLUDE			../inc
+USERINCLUDE			../inc 
 MW_LAYER_SYSTEMINCLUDE
 
-option MSVC /GX /W3
+option MSVC /W3 /EHsc
 
 sourcepath              ../src 
 
@@ -43,3 +48,4 @@
 source CdlTkWriteInstance.cpp
 
 // End of File
+
--- a/cdlcompilertoolkit/group/bld.inf	Thu Dec 17 09:14:18 2009 +0200
+++ b/cdlcompilertoolkit/group/bld.inf	Mon Jan 18 21:13:05 2010 +0200
@@ -17,12 +17,12 @@
 #include <platform_paths.hrh>
 
 PRJ_PLATFORMS
-TOOLS CWTOOLS
+TOOLS CWTOOLS TOOLS2
 
 PRJ_EXPORTS
 
 PRJ_MMPFILES
-#if defined(TOOLS) || defined(CWTOOLS)
+#if defined(TOOLS) || defined(CWTOOLS) || defined(TOOLS2)
 CdlCompilerToolkit.mmp
 #endif
 
--- a/cdlcompilertoolkit/src/CdlTkClientHeader.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/cdlcompilertoolkit/src/CdlTkClientHeader.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -95,7 +95,7 @@
 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).\n\
 * All rights reserved.\n\
 * This component and the accompanying materials are made available\n\
-* under the terms of  \"Eclipse Public License v1.0\"\n\
+* under the terms of \"Eclipse Public License v1.0\"\n\
 * which accompanies this distribution, and is available\n\
 * at the URL \"http://www.eclipse.org/legal/epl-v10.html\".\n\
 *\n\
@@ -116,7 +116,7 @@
 #ifndef $CDLGUARD\n\
 #define $CDLGUARD\n\
 \n\
-#include <cdlengine.h>\n\
+#include <CdlEngine.h>\n\
 #include <$FILE.common.h>\n\
 \n\
 namespace $CDLNS\n\
@@ -174,7 +174,7 @@
 } // end of namespace $CDLNS\n\
 #endif // $CDLGUARD\n";
 
-const int KMsvcClassMaxSize = 1000;
+const unsigned int KMsvcClassMaxSize = 1000;
 const string KTypeInfoOn = "on";
 const string KTypeInfoOff = "off";
 
--- a/cdlcompilertoolkit/src/CdlTkInstance.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/cdlcompilertoolkit/src/CdlTkInstance.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -225,7 +225,10 @@
 
 std::string CCdlTkInstance::InstanceNameToDllInstanceName(const std::string& aName)
 	{
-	return CdlTkUtil::Replace("$INST", CdlTkUtil::ToCpp(aName), KDllInstanceName);
+	string tempName = aName;
+	tempName = CdlTkUtil::Replace("\r", "", tempName);
+	tempName = CdlTkUtil::Replace("\n", "", tempName);
+	return CdlTkUtil::Replace("$INST", CdlTkUtil::ToCpp(tempName), KDllInstanceName);
 	}
 
 
--- a/cdlcompilertoolkit/src/CdlTkParser.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/cdlcompilertoolkit/src/CdlTkParser.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -21,7 +21,8 @@
 #include <iostream>
 using namespace std;
 
-namespace CdlCompilerToolkit {
+namespace CdlCompilerToolkit
+ {
 
 //
 // SyntaxErr
@@ -189,7 +190,7 @@
 		{
 		// add the line to the API buffer
 		CdlTkUtil::AppendString(iApiBuf, line);
-		int pos;
+		string::size_type pos;
 		// extract API declarations from the API buffer, separated by semi-colons
 		while ((pos = iApiBuf.find_first_of(';')) != string::npos)
 			{
@@ -239,7 +240,6 @@
 	{
 	if (aLine.size() < aHeader.size() || aLine.substr(0, aHeader.size()) != aHeader)
 		return false;
-
 	aVal = aLine.substr(aHeader.size());
 	StripComments(aVal, iComment);
 	CdlTkUtil::StripLeadingAndTrailingWhitespace(aVal);
@@ -248,7 +248,7 @@
 
 void CCdlTkCdlFileParser::StripComments(string& aStr, string& aComment)
 	{
-	int pos = aStr.find(KCommentStart);
+	string::size_type pos = aStr.find(KCommentStart);
 	if (pos != string::npos)
 		{
 		aComment += aStr.substr(pos) + "\n";
@@ -263,7 +263,7 @@
 	if (isFunc)
 		{
 		auto_ptr<CCdlTkFunctionApi> pFuncApi(new CCdlTkFunctionApi(aCdl));
-		int paramStart = aLine.find('(');
+		string::size_type paramStart = aLine.find('(');
 		if (paramStart == string::npos)
 			SyntaxError("function has missing '('");
 		string params = aLine.substr(paramStart);
@@ -291,7 +291,7 @@
 	{
 	while (aList.size())
 		{
-		int pos = aList.find(',');
+		string::size_type pos = aList.find(',');
 		string param = aList.substr(0, pos);
 		aList = aList.substr(param.size() + (pos == string::npos ? 0 : 1));
 		CdlTkUtil::StripLeadingAndTrailingWhitespace(aList);
@@ -306,7 +306,7 @@
 void CCdlTkCdlFileParser::ParseNameTypeAndDefaultValue(string& aStr, string& aName, string& aType, string& aDefaultValue)
 	{
 	CdlTkUtil::StripLeadingAndTrailingWhitespace(aStr);
-	int eq = aStr.find_last_of(KEqualsSign);
+	string::size_type eq = aStr.find_last_of(KEqualsSign);
 	if(eq != string::npos)
 		{
 		aDefaultValue = aStr.substr(eq + 1);
@@ -326,10 +326,10 @@
 
 void CCdlTkCdlFileParser::ParseTranslationText(CCdlTkDataTypeTranslation& aTrans, string& aLine)
 	{
-	int pos1 = aLine.find('#');
+	string::size_type pos1 = aLine.find('#');
 	if (pos1 == string::npos)
 		SyntaxError("First # not found");
-	int pos2 = aLine.find('#', pos1+1);
+	string::size_type pos2 = aLine.find('#', pos1+1);
 	if (pos2 == string::npos)
 		SyntaxError("Second # not found");
 	if (aLine.find('#', pos2+1) != string::npos)
--- a/cdlcompilertoolkit/src/CdlTkProcess.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/cdlcompilertoolkit/src/CdlTkProcess.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -31,7 +31,7 @@
 
 string CCdlTkProcess::CdlBaseNameAndPath(const CCdlTkInterface& aCdl)
 	{
-	return CdlTkUtil::ToLower(CdlTkUtil::OutputPath() + CdlTkUtil::StripPath(aCdl.FileName()));
+	return CdlTkUtil::OutputPath() + CdlTkUtil::ToLower(CdlTkUtil::StripPath(aCdl.FileName()));
 	}
 
 void CCdlTkProcess::AssertInterfaceNotExtended(const CCdlTkInterface& aCdl)
--- a/cdlcompilertoolkit/src/CdlTkSyntaxCheck.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/cdlcompilertoolkit/src/CdlTkSyntaxCheck.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -14,11 +14,18 @@
 * Description:
 *
 */
-#include "CdlCompilerToolkit/CdlTkProcess.h"
+#include <CdlCompilerToolkit/CdlTkProcess.h>
+#include <CdlCompilerToolkit/CdlCompat.h>
 #include "CdlTkPriv.h"
 #include <fstream>
 #include <iomanip>
+
+#ifdef CDL_W32
 #include <direct.h>
+#else
+#include <unistd.h>
+#define _getcwd getcwd
+#endif
 #include <iostream>
 using namespace std;
 
--- a/cdlcompilertoolkit/src/CdlTkUtil.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/cdlcompilertoolkit/src/CdlTkUtil.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -23,7 +23,18 @@
 #include <fstream>
 #include <sstream>
 #include <iomanip>
+#include <cassert>
+
+#include <CdlCompilerToolkit/CdlCompat.h>
+
+#ifdef CDL_W32
 #include <direct.h>
+#else
+#include <unistd.h>
+
+#define _getcwd getcwd
+#endif
+
 using namespace std;
 
 namespace CdlCompilerToolkit {
@@ -113,6 +124,7 @@
 // CdlTkUtil
 //
 
+#ifdef CDL_W32
 string CdlTkUtil::CurrentDrive()
 	{
 	static string drive = "?:";
@@ -120,6 +132,15 @@
 		drive[0] = 'A' + _getdrive() - 1;
 	return drive;
 	}
+#else	// Linux
+string CdlTkUtil::CurrentDrive()
+	{
+	char *epocroot = getenv("EPOCROOT");
+	assert(epocroot != NULL);
+	
+	return std::string(epocroot);
+	}
+#endif
 
 string CdlTkUtil::CurrentDir()
 	{
@@ -127,8 +148,13 @@
 	if (dir == "")
 		{
 		char buf[256];
+#ifdef CDL_W32
 		dir = _getcwd(buf, 255) + 2;	// +2 removes drive
-		dir += "\\";
+#else
+//for linux
+                dir = _getcwd(buf, 255);
+#endif
+		dir += PATHSEP;
 		}
 	return dir;
 	}
@@ -146,9 +172,9 @@
 	{
 	gOutputPath = aPath;
 	if (gOutputPath.size() == 0)
-		gOutputPath += ".\\";
-	else if (gOutputPath[gOutputPath.size()-1] != '\\')
-		gOutputPath += "\\";	// CDL Tk convention is that paths always end in \ 
+		gOutputPath += PATHSEP;
+	else if (! IsPathSeparator( gOutputPath[gOutputPath.size()-1] ) )
+		gOutputPath += PATHSEP;	// CDL Tk convention is that paths always end in backslash.
 	}
 
 string CdlTkUtil::ToLower(const string& aString)
@@ -170,6 +196,9 @@
 string CdlTkUtil::ToCpp(const string& aString)
 	{
 	string r = aString;
+	r = Replace("\r", "", r);
+	r = Replace("\n", "", r);
+
 	for (string::iterator pC = r.begin(); pC != r.end(); ++pC)
 		{
 		if (!CdlTkUtil::IsCpp(*pC))
@@ -182,14 +211,14 @@
 
 string CdlTkUtil::StripPath(const string& aPath)
 	{
-	return aPath.substr(aPath.rfind('\\')+1);
+	return aPath.substr( FindLastPathSeparator(aPath) + 1 );
 	}
 
 string CdlTkUtil::ResolvePath(const string& aPath, const string& aFileName)
 	{
 	int size = aFileName.size();
 	// if aFileName is absolute, return it
-	if (size > 0 && aFileName[0] == '\\' || size > 1 && aFileName[1] == ':')
+	if (size > 0 && IsPathSeparator( aFileName[0] ) || size > 1 && aFileName[1] == ':')
 		return aFileName;
 
 	string path = aPath;
@@ -202,11 +231,11 @@
 		if (file.size() > 1 && file[1]=='.' && !path.empty())
 			{
 			path.resize(path.size()-1);			// remove the last slash
-			path.resize(path.rfind('\\')+1);	// remove everything after the next last slash
+			path.resize( FindLastPathSeparator(path) + 1 );	// remove everything after the next last slash
 			}
 
 		// chop the head directory off the file - it has to have a '\' if it has a '.'
-		int fileSlashPos = file.find('\\');
+		string::size_type fileSlashPos = FindFirstPathSeparator( file );
 		if (fileSlashPos == string::npos)
 			throw CdlTkAssert("Illegal filename");
 		file = file.substr(fileSlashPos + 1);
@@ -221,7 +250,7 @@
 	// convert the whole thing to lower case
 	string res = ToLower(aString);
 	// find the first character after the last \ - will be 0 if no \ is present.
-	int filenamePos = res.find_last_of('\\') + 1;
+	string::size_type filenamePos = FindLastPathSeparator(res) + 1;
 	if (filenamePos >= res.size())
 		throw CdlTkAssert(aString + " has no filename");
 	// uppercase the first character
@@ -349,10 +378,19 @@
 void CdlTkUtil::OpenTempOutput(ofstream& aStream, CCdlTkFileCleanup& aFile, ios_base::openmode aOpenMode)
 	{
 	char tmpName[256];
+#ifdef CDL_W32
 	if (!tmpnam(tmpName))
 		{
 		throw CdlTkAssert("Can't create temporary file name");
 		}
+#else
+    strcpy(tmpName, "cdltkutilXXXXXX");
+    
+    if (-1 == mkstemp(tmpName))
+		{
+		throw CdlTkAssert("Can't create temporary file name");
+		}
+#endif
 
 	OpenOutput(aStream, tmpName, aOpenMode);
 	aFile.Set(tmpName);
@@ -363,7 +401,7 @@
 	aStream.open(aFileName.c_str(), aOpenMode);
 	if (!aStream.is_open())
 		{
-		throw CdlTkFileOpenErr(aFileName);
+		//throw CdlTkFileOpenErr(aFileName);
 		}
 	}
 
@@ -425,7 +463,7 @@
 
 void CdlTkUtil::StripLeadingAndTrailingWhitespace(string& aStr)
 	{
-	int pos = aStr.find_first_not_of(KWhiteSpace);
+	string::size_type pos = aStr.find_first_not_of(KWhiteSpace);
 	if (pos == string::npos)
 		{
 		aStr = KEmptyString;
@@ -451,6 +489,38 @@
 	return IsAlpha(aChar) || IsNumeric(aChar) || aChar == '_';
 	}
 
+bool CdlTkUtil::IsPathSeparator(char aChar)
+    {
+    return aChar == '/' || aChar == '\\';
+    }
+
+std::string::size_type CdlTkUtil::FindFirstPathSeparator(const std::string& s)
+    {
+    std::string::size_type f = s.find(FORWARDSLASH);
+    std::string::size_type b = s.find(BACKSLASH);
+
+    if(f == std::string::npos)
+        return b;
+    
+    if(b == std::string::npos)
+        return f;
+    
+    return f < b ? f : b;
+    }
+
+std::string::size_type CdlTkUtil::FindLastPathSeparator(const std::string& s)
+    {
+    std::string::size_type f = s.rfind(FORWARDSLASH);
+    std::string::size_type b = s.rfind(BACKSLASH);
+
+    if(f == std::string::npos)
+        return b;
+    
+    if(b == std::string::npos)
+        return f;
+    
+    return f > b ? f : b;
+    }
 void ZeroInts(int* aInts, int aCount)
 	{
 	for (int ii=0; ii<aCount; ii++)
@@ -479,7 +549,7 @@
 			if (target[targetMatch] == ch)
 				{
 				++targetMatch;
-				if (targetMatch == target.size())
+				if ( static_cast<string::size_type>( targetMatch ) == target.size())
 					{
 					AppendString(ret, aIn.substr(lastMatch, pos - targetMatch - lastMatch));
 					AppendString(ret, aSet[ii].second);
@@ -501,7 +571,7 @@
 
 void CdlTkUtil::AppendString(string& aTarget, const string& aAppend)
 	{
-	int resSize = aTarget.size() + aAppend.size();
+	string::size_type resSize = aTarget.size() + aAppend.size();
 	if (aTarget.capacity() < resSize)
 		aTarget.reserve(resSize*2);
 	aTarget.append(aAppend);
@@ -517,7 +587,8 @@
 void CdlTkUtil::SetCommandLine(int argc, char* argv[])
 	{
 	string tool(argv[0]);
-	tool = tool.substr(tool.find_last_of('\\') + 1);
+
+	tool = StripPath( tool );
 	gCommandLine = tool.substr(0, tool.find_last_of('.'));
 	for (int ii=1; ii<argc; ii++)
 		{
--- a/cdlcompilertoolkit/src/CdlTkWriteCommonDefs.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/cdlcompilertoolkit/src/CdlTkWriteCommonDefs.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -33,12 +33,13 @@
 	CCdlTkWriteCommonDefs commonDefs(aCdl, out, aFileName);
 	commonDefs.ProcessHRH(out);
 	out.close();
-	CdlTkUtil::ExportFileIfWritable(tempFile, CdlTkUtil::ToLower(aFileName+"rh"));
+	CdlTkUtil::ExportFileIfWritable(tempFile, aFileName+"rh");
 
 	CdlTkUtil::OpenTempOutput(out, tempFile);
 	commonDefs.Process();
 	out.close();
-	CdlTkUtil::ExportFileIfWritable(tempFile, CdlTkUtil::ToLower(aFileName));
+
+	CdlTkUtil::ExportFileIfWritable(tempFile, aFileName);
 	}
 
 CCdlTkWriteCommonDefs::CCdlTkWriteCommonDefs(const CCdlTkInterface& aCdl, ofstream& aStream, const string& aFileName)
@@ -51,7 +52,7 @@
 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).\n\
 * All rights reserved.\n\
 * This component and the accompanying materials are made available\n\
-* under the terms of  \"Eclipse Public License v1.0\"\n\
+* under the terms of \"Eclipse Public License v1.0\"\n\
 * which accompanies this distribution, and is available\n\
 * at the URL \"http://www.eclipse.org/legal/epl-v10.html\".\n\
 *\n\
@@ -76,7 +77,6 @@
 	{
 	iStream = &aStream;
 	string fileName = iFileName + "rh";
-
 	string cdlFileName(CdlTkUtil::ToLower(iCdl.FileName()));
 //	Stream() << CdlTkUtil::Replace("$FILE", cdlFileName, KCommonDefsHeader);
 	Stream() << KCommonDefsHeader;
@@ -87,6 +87,7 @@
 	headerSet.Add("$NAME", header.Name());
 	headerSet.Add("$UID", CdlTkUtil::IntToHexString(header.Uid()));
 	headerSet.Add("$NSPACE", iCdl.NamespaceName());
+
 	Stream() << CdlTkUtil::MultiReplace(headerSet, KHrhContents);
 
 	WriteHeaderGuardEnd(fileName, Stream());
@@ -141,6 +142,7 @@
 	CdlTkUtil::CReplaceSet headerSet;
 	headerSet.Add("$NAME", header.Name());
 	headerSet.Add("$NSPACE", iCdl.NamespaceName());
+
 	headerSet.Add("$THISFILE", CdlTkUtil::ToLower(CdlTkUtil::StripPath(iFileName)));
 	headerSet.Add("$MAJOR", CdlTkUtil::IntToString(header.Version().Major()));
 	headerSet.Add("$MINOR", CdlTkUtil::IntToString(header.Version().Minor()));
--- a/cdlcompilertoolkit/src/CdlTkWriteDll.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/cdlcompilertoolkit/src/CdlTkWriteDll.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -136,7 +136,7 @@
 TARGET       $UID.rsc\n\
 END\n\
 START RESOURCE   $UID_cdl_detail.rss\n\
-TARGETPATH       resource\\cdl\n\
+TARGETPATH       resource/cdl\n\
 END\n\
 \n\
 $EXTRA";
@@ -146,15 +146,20 @@
 
 void CCdlTkWriteDll::WriteMmp() const
 	{
-	string name = CdlTkUtil::ToLower(CdlTkUtil::OutputPath() + iDll.Name() + ".mmp");
+	string name = CdlTkUtil::OutputPath() + CdlTkUtil::ToLower(iDll.Name() + ".mmp");
 	ofstream stream;
 	CCdlTkFileCleanup tempFile;
 	CdlTkUtil::OpenTempOutput(stream, tempFile);
 
 	string source;
 	for (CCdlTkDll::CInstances::const_iterator pName = iDll.Instances().begin(); pName != iDll.Instances().end(); ++pName)
-		CdlTkUtil::AppendString(source, CdlTkUtil::Replace("$NAME", CdlTkUtil::CorrectFilenameCase(*pName), KMmpSourceLine));
+		{
+		string tempPName = CdlTkUtil::Replace("\r", "", *pName);
+		tempPName = CdlTkUtil::Replace("\n", "", tempPName);
 
+		CdlTkUtil::AppendString(source, CdlTkUtil::Replace("$NAME", CdlTkUtil::CorrectFilenameCase(tempPName), KMmpSourceLine));
+
+		}
 	string libraries;
 	for (CCdlTkDll::CLibraries::const_iterator pLib = iDll.Libraries().begin(); pLib != iDll.Libraries().end(); ++pLib)
 		CdlTkUtil::AppendString(libraries, CdlTkUtil::Replace("$NAME", *pLib, KMmpLibLine));
@@ -185,7 +190,7 @@
 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).\n\
 * All rights reserved.\n\
 * This component and the accompanying materials are made available\n\
-* under the terms of \"Eclipse Public License v1.0\"\n\
+* under the terms of  \"Eclipse Public License v1.0\"\n\
 * which accompanies this distribution, and is available\n\
 * at the URL \"http://www.eclipse.org/legal/epl-v10.html\".\n\
 *\n\
@@ -243,7 +248,7 @@
 
 void CCdlTkWriteDll::WriteMainCpp() const
 	{
-	string name = CdlTkUtil::CorrectFilenameCase(CdlTkUtil::OutputPath() + iDll.Name() + ".cpp");
+	string name = CdlTkUtil::OutputPath() + CdlTkUtil::CorrectFilenameCase(iDll.Name() + ".cpp");
 	ofstream stream;
 	CCdlTkFileCleanup tempFile;
 	CdlTkUtil::OpenTempOutput(stream, tempFile);
@@ -252,8 +257,11 @@
 	string instances;
 	for (CCdlTkDll::CInstances::const_iterator pName = iDll.Instances().begin(); pName != iDll.Instances().end(); ++pName)
 		{
-		CdlTkUtil::AppendString(includes, CdlTkUtil::Replace("$NAME", CdlTkUtil::ToLower(*pName), KMainCppInclude));
-		CdlTkUtil::AppendString(instances, CdlTkUtil::Replace("$CPP_NAME", CdlTkUtil::ToCpp(*pName), KMainCppInstance));
+		string tempPName = CdlTkUtil::Replace("\r", "", *pName);
+		tempPName = CdlTkUtil::Replace("\n", "", tempPName);
+
+		CdlTkUtil::AppendString(includes, CdlTkUtil::Replace("$NAME", CdlTkUtil::ToLower(tempPName), KMainCppInclude));
+		CdlTkUtil::AppendString(instances, CdlTkUtil::Replace("$CPP_NAME", CdlTkUtil::ToCpp(tempPName), KMainCppInstance));
 		}
 
 	stringstream majorVer;
@@ -286,7 +294,7 @@
 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).\n\
 * All rights reserved.\n\
 * This component and the accompanying materials are made available\n\
-* under the terms of \"Eclipse Public License v1.0\"\n\
+* under the terms of  \"Eclipse Public License v1.0\"\n\
 * which accompanies this distribution, and is available\n\
 * at the URL \"http://www.eclipse.org/legal/epl-v10.html\".\n\
 *\n\
@@ -311,7 +319,7 @@
 
 void CCdlTkWriteDll::WriteInstanceIdHeader() const
 	{
-	string name = CdlTkUtil::ToLower(CdlTkUtil::OutputPath() + KDllInstHeader);
+	string name = CdlTkUtil::OutputPath() + CdlTkUtil::ToLower(KDllInstHeader);
 	ofstream stream;
 	CCdlTkFileCleanup tempFile;
 	CdlTkUtil::OpenTempOutput(stream, tempFile);
@@ -328,7 +336,10 @@
 		}
 
 	CdlTkUtil::CReplaceSet headerSet;
-	headerSet.Add("$DLL_NAME", iDll.Name());
+	string dllName = iDll.Name();
+	dllName = CdlTkUtil::Replace("\r", "", dllName);
+	dllName = CdlTkUtil::Replace("\n", "", dllName);
+	headerSet.Add("$DLL_NAME", dllName);
 	headerSet.Add("$IDS", ids);
 	headerSet.Add("$CMDLINE", CdlTkUtil::CommandLine());
 	string header = CdlTkUtil::MultiReplace(headerSet, KInstHeaderBody);
@@ -344,7 +355,7 @@
 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).\n\
 * All rights reserved.\n\
 * This component and the accompanying materials are made available\n\
-* under the terms of \"Eclipse Public License v1.0\"\n\
+* under the terms of  \"Eclipse Public License v1.0\"\n\
 * which accompanies this distribution, and is available\n\
 * at the URL \"http://www.eclipse.org/legal/epl-v10.html\".\n\
 *\n\
@@ -357,7 +368,7 @@
 *\n\
 */\n\n\
 #include <ecom/registryinfo.rh>\n\
-#include <cdlecom.hrh>\n\
+#include <CdlEcom.hrh>\n\
 \n\
 CDL_ECOM_MAIN_REG_WITH_VERSION(0x$DLLUID, $DLLVER)\n";
 
@@ -365,7 +376,7 @@
 	{
 	string dllUid = CdlTkUtil::IntToHexString(iDll.Uid()).substr(2);
 	string dllVer = CdlTkUtil::IntToString(iDll.Version());
-	string name = CdlTkUtil::ToLower(CdlTkUtil::OutputPath() + dllUid + ".rss");
+	string name = CdlTkUtil::OutputPath() + CdlTkUtil::ToLower(dllUid + ".rss");
 	ofstream stream;
 	CCdlTkFileCleanup tempFile;
 	CdlTkUtil::OpenTempOutput(stream, tempFile);
@@ -398,8 +409,8 @@
 * Description:\n\
 *\n\
 */\n\n\
-#include <cdlecom.rh>\n\
-#include <cdlecom.hrh>\n\
+#include <CdlEcom.rh>\n\
+#include <CdlEcom.hrh>\n\
 \n\
 $INCLUDES\
 \n\
@@ -413,7 +424,7 @@
 void CCdlTkWriteDll::WriteEcomDetailRss() const
 	{
 	string dllUid = CdlTkUtil::IntToHexString(iDll.Uid()).substr(2);
-	string name = CdlTkUtil::ToLower(CdlTkUtil::OutputPath() + dllUid + "_cdl_detail.rss");
+	string name = CdlTkUtil::OutputPath() + CdlTkUtil::ToLower(dllUid + "_cdl_detail.rss");
 	ofstream stream;
 	CCdlTkFileCleanup tempFile;
 	CdlTkUtil::OpenTempOutput(stream, tempFile);
@@ -423,10 +434,12 @@
 	CCdlTkDll::CInstances::const_iterator begin = iDll.Instances().begin();
 	for (CCdlTkDll::CInstances::const_iterator pName = begin; pName != iDll.Instances().end(); ++pName)
 		{
+		string tempPName = CdlTkUtil::Replace("\r", "", *pName);
+		tempPName = CdlTkUtil::Replace("\n", "", tempPName);
 		string instance = (pName != begin) ? "," : "";
-		instance += CdlTkUtil::Replace("$CPP_NAME", CdlTkUtil::ToCpp(*pName), KDetailRssInstance);
+		instance += CdlTkUtil::Replace("$CPP_NAME", CdlTkUtil::ToCpp(tempPName), KDetailRssInstance);
 		CdlTkUtil::AppendString(instances, instance);
-		CdlTkUtil::AppendString(includes, CdlTkUtil::Replace("$NAME", CdlTkUtil::ToLower(*pName), KDetailRssInclude));
+		CdlTkUtil::AppendString(includes, CdlTkUtil::Replace("$NAME", CdlTkUtil::ToLower(tempPName), KDetailRssInclude));
 		}
 
 	CdlTkUtil::CReplaceSet rssSet;
--- a/cdlcompilertoolkit/src/CdlTkWriteInstance.cpp	Thu Dec 17 09:14:18 2009 +0200
+++ b/cdlcompilertoolkit/src/CdlTkWriteInstance.cpp	Mon Jan 18 21:13:05 2010 +0200
@@ -36,7 +36,9 @@
 
 void CCdlTkWriteInstance::Process()
 	{
-	string implName = CdlTkUtil::ToLower(CdlTkUtil::OutputPath() + CdlTkUtil::StripPath(iInstance.Name()));
+	string implName = CdlTkUtil::ToLower( CdlTkUtil::StripPath(iInstance.Name()));
+	implName = CdlTkUtil::Replace("\r","",implName);
+	implName = CdlTkUtil::Replace("\n","",implName);
 	string headerName(implName + ".h");
 	InitReplace(headerName);
 	ProcessCdl();
@@ -47,30 +49,35 @@
 	CdlTkUtil::OpenTempOutput(hrhStream, tempFile);
 	ProcessInstanceHrh(hrhStream, headerName+"rh");
 	hrhStream.close();
-	CdlTkUtil::ExportFileIfWritable(tempFile, headerName+"rh");
+	CdlTkUtil::ExportFileIfWritable(tempFile, CdlTkUtil::OutputPath() + headerName+"rh");
 
 	ofstream headerStream;
 	CdlTkUtil::OpenTempOutput(headerStream, tempFile);
 	ProcessInstanceHeader(headerStream, headerName);
 	headerStream.close();
-	CdlTkUtil::ExportFileIfWritable(tempFile, headerName);
+	CdlTkUtil::ExportFileIfWritable(tempFile, CdlTkUtil::OutputPath() + headerName);
 
 	ofstream cppStream;
 	CdlTkUtil::OpenTempOutput(cppStream, tempFile);
 	ProcessInstance(cppStream, headerName);
 	cppStream.close();
-	CdlTkUtil::ExportFileIfWritable(tempFile, CdlTkUtil::CorrectFilenameCase(implName + ".cpp"));
+
+	CdlTkUtil::ExportFileIfWritable(tempFile, CdlTkUtil::OutputPath() + CdlTkUtil::CorrectFilenameCase(implName + ".cpp"));
 	}
 
 void CCdlTkWriteInstance::InitReplace(const std::string& aHeaderName)
 	{
 	iReplace.clear();
-	iReplace.Add("$INSTNAME", iInstance.Name());
+	string instanceName = iInstance.Name();
+	instanceName = CdlTkUtil::Replace("\r", "", instanceName);
+	instanceName = CdlTkUtil::Replace("\n", "", instanceName);
+	iReplace.Add("$INSTNAME", instanceName);
 	iReplace.Add("$CDLNAME", CdlTkUtil::StripPath(iCdl.FileName()));
 	iReplace.Add("$CDLINCNAME", CdlTkUtil::ToLower(CdlTkUtil::StripPath(iCdl.FileName())));
 	iReplace.Add("$HEADERNAME", CdlTkUtil::ToLower(CdlTkUtil::StripPath(aHeaderName)));
 	iReplace.Add("$EXTRA", iInstance.ExtraCpp());
 	iReplace.Add("$INSTNS", CdlTkUtil::ToCpp(iInstance.Name()));
+
 	iReplace.Add("$CDLNS", iCdl.NamespaceName());
 	iReplace.Add("$CDLGUARD", HeaderGuardName(iCdl.FileName() + ".custom.h"));
 	iReplace.Add("$INSTGUARD", HeaderGuardName(aHeaderName));
@@ -92,7 +99,6 @@
 	AssertInterfaceNotExtended(iCdl);
 
 	string baseName = CdlBaseNameAndPath(iCdl);
-
 	string commonHeaderName(baseName + KCommonHeader);
 	CCdlTkWriteCommonDefs::ExportCommonDefs(iCdl, commonHeaderName);
 
--- a/toollibraries/group/bld.inf	Thu Dec 17 09:14:18 2009 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#include "../xercesc/group/bld.inf"
-#include "../arabica/group/bld.inf"
\ No newline at end of file
--- a/uitools_plat/cdl_api/group/bld.inf	Thu Dec 17 09:14:18 2009 +0200
+++ b/uitools_plat/cdl_api/group/bld.inf	Mon Jan 18 21:13:05 2010 +0200
@@ -29,3 +29,5 @@
 ../inc/CdlCompilerToolkit/CdlTkInterface.h     MW_LAYER_PLATFORM_EXPORT_PATH(CdlCompilerToolkit/CdlTkInterface.h)
 ../inc/CdlCompilerToolkit/CdlTkUtil.h     MW_LAYER_PLATFORM_EXPORT_PATH(CdlCompilerToolkit/CdlTkUtil.h)
 ../inc/CdlCompilerToolkit/CdlTkProcess.h     MW_LAYER_PLATFORM_EXPORT_PATH(CdlCompilerToolkit/CdlTkProcess.h)
+../inc/CdlCompilerToolkit/CdlCompat.h     MW_LAYER_PLATFORM_EXPORT_PATH(CdlCompilerToolkit/CdlCompat.h)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/uitools_plat/cdl_api/inc/CdlCompilerToolkit/CdlCompat.h	Mon Jan 18 21:13:05 2010 +0200
@@ -0,0 +1,23 @@
+// Cdlcompat.h
+
+#ifndef CDLCOMPAT_H
+#define CDLCOMPAT_H
+
+/* _MSC_VER for checking VC6, so that we can keep this library still compilable using `tools'. */
+#if (defined(__MSVCRT__) || defined(_MSC_VER))
+#define CDL_W32
+#endif
+
+// path separator
+/* #ifdef CDL_W32 */
+/* #define PATHSEP "\\" */
+/* #define PATHSEPCHAR '\\' */
+/* #else */
+#define PATHSEP "/"
+#define PATHSEPCHAR '/'
+/* #endif */
+
+const char FORWARDSLASH = '/';
+const char BACKSLASH = '\\';
+
+#endif
--- a/uitools_plat/cdl_api/inc/CdlCompilerToolkit/CdlTkInterface.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/uitools_plat/cdl_api/inc/CdlCompilerToolkit/CdlTkInterface.h	Mon Jan 18 21:13:05 2010 +0200
@@ -455,7 +455,7 @@
 	// member data used in Match() calculation
 	std::string iTextBeforeTypeVar;
 	std::string iTextAfterTypeVar;
-	int iTypeVarPos;
+	std::string::size_type iTypeVarPos;
 	int iSizeAfterTypeVar;
 	int iTypeSize;
 	int iTypeSizeWithoutTypeVar;
--- a/uitools_plat/cdl_api/inc/CdlCompilerToolkit/CdlTkProcess.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/uitools_plat/cdl_api/inc/CdlCompilerToolkit/CdlTkProcess.h	Mon Jan 18 21:13:05 2010 +0200
@@ -20,8 +20,11 @@
 #include <CdlCompilerToolkit/CdlTkInterface.h>
 #include <CdlCompilerToolkit/CdlTkInstance.h>
 #include <fstream>
+#include <memory>
 
 namespace CdlCompilerToolkit {
+class CCdlTkApi;
+class CCdlTkInterface;
 
 /**
 * CCdlTkProcess
@@ -385,6 +388,8 @@
     * Called when an API is found that is only in the left hand interface
     */
 	virtual void ApiNotInRight(const CCdlTkApi& aApi) = 0;
+
+	virtual ~MCdlTkApiCheckObserver(){}
 	};
 
 /**
--- a/uitools_plat/cdl_api/inc/CdlCompilerToolkit/CdlTkUtil.h	Thu Dec 17 09:14:18 2009 +0200
+++ b/uitools_plat/cdl_api/inc/CdlCompilerToolkit/CdlTkUtil.h	Mon Jan 18 21:13:05 2010 +0200
@@ -145,6 +145,14 @@
     */
 	static bool IsCpp(char aChar);
 
+    /**
+     * Is the character equal to '\\' or '/' ? 
+     * @param aChar the character to test
+     * @return true if the character is a path separator
+     */
+	static bool IsPathSeparator(char aChar);
+	static std::string::size_type FindFirstPathSeparator(const std::string& s);
+	static std::string::size_type FindLastPathSeparator(const std::string& s);
 	/**
     * This class contains a set of terms to replace in a string. It is used
 	* with CdlTkUtil::MultiReplace().
@@ -276,7 +284,7 @@
 		std::string::const_iterator pWord = pChar;
 		for (; ; ++pChar)
 			{
-			if (pChar == aString.end() || ws.find_first_of(*pChar) != string::npos)
+			  if (pChar == aString.end() || ws.find_first_of(*pChar) != std::string::npos)
 				{
 				if (pWord != pChar)
 					{