[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

[XaraXtreme-commits] Commit Complete



Commit by  : gerry
Repository : xara
Revision   : 1237
Date       : Thu Jun  1 18:40:12 BST 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/camfiltr.cpp
   M /Trunk/XaraLX/Kernel/cxfile.cpp
   M /Trunk/XaraLX/Kernel/cxfrec.cpp
   M /Trunk/XaraLX/Kernel/cxfrec.h
   M /Trunk/XaraLX/Kernel/cxfrech.cpp
   M /Trunk/XaraLX/Kernel/cxfrech.h
   M /Trunk/XaraLX/wxOil/filesize.cpp
   M /Trunk/XaraLX/wxOil/makemsg.cpp
   M /Trunk/XaraLX/wxOil/stdwx.h

More tweaks for building XarLib


Diff:
Index: Trunk/XaraLX/Kernel/cxfile.cpp
===================================================================
--- Trunk/XaraLX/Kernel/cxfile.cpp	(revision 1236)
+++ Trunk/XaraLX/Kernel/cxfile.cpp	(revision 1237)
@@ -140,6 +140,14 @@
 CC_IMPLEMENT_DYNAMIC(NULLXaraFile,CXaraFile);
 #endif
 
+CC_IMPLEMENT_MEMDUMP(AtomicTagListItem,ListItem)
+CC_IMPLEMENT_MEMDUMP(EssentialTagListItem,ListItem)
+CC_IMPLEMENT_MEMDUMP(TagDescriptionListItem,ListItem)
+CC_IMPLEMENT_MEMDUMP(AtomicTagList,List)
+CC_IMPLEMENT_MEMDUMP(EssentialTagList,List)
+CC_IMPLEMENT_MEMDUMP(TagDescriptionList,List)
+
+
 // This will get Camelot to display the filename and linenumber of any memory allocations
 // that are not released at program exit
 // Declare smart memory handling in Debug builds
@@ -187,6 +195,8 @@
 #if defined(EXCLUDE_FROM_XARLIB)
 	pAtomicTagList = NULL;
 	pEssentialTagList = NULL;
+
+	EndOfFile = FALSE;
 #endif
 }
 
@@ -521,7 +531,7 @@
 	TotalNumBytesToRead	= 0;
 
 	BOOL ok = TRUE;
-	UINT32 n;
+	UINT32 n = 0;
 
 	// The first 8 bytes should be our unique ID sequence
 	if (ok) ok = Read(&n);
@@ -584,8 +594,17 @@
 BOOL StandardDefaultRecordHandler::HandleRecord(CXaraFileRecord* pCXaraFileRecord)
 {
 	ERROR2IF(pCXaraFileRecord == NULL,FALSE,"NULL record ptr");
+#if !defined(EXCLUDE_FROM_XARLIB)
+	return UnrecognisedTag(pCXaraFileRecord->GetTag());
+#else
 
-	return UnrecognisedTag(pCXaraFileRecord->GetTag());
+	if (m_pfnRecordHandler)
+	{
+		return (m_pfnRecordHandler)(m_pMagic, pCXaraFileRecord);
+	}
+
+	return(TRUE);
+#endif
 }
 
 //-------------------------------------------------------------------------------------------
Index: Trunk/XaraLX/Kernel/cxfrech.cpp
===================================================================
--- Trunk/XaraLX/Kernel/cxfrech.cpp	(revision 1236)
+++ Trunk/XaraLX/Kernel/cxfrech.cpp	(revision 1237)
@@ -1532,6 +1532,7 @@
 	return FALSE;
 }
 
+
 #if !defined(EXCLUDE_FROM_XARLIB)
 BOOL CamelotRecordHandler::UnrecognisedTag(UINT32 Tag)
 {
Index: Trunk/XaraLX/Kernel/cxfrec.h
===================================================================
--- Trunk/XaraLX/Kernel/cxfrec.h	(revision 1236)
+++ Trunk/XaraLX/Kernel/cxfrec.h	(revision 1237)
@@ -155,6 +155,7 @@
 	virtual	BOOL WriteFIXED16(FIXED16 n);
 	virtual BOOL WriteANGLE(ANGLE a);
 	virtual BOOL WriteWCHAR(WCHAR w);
+	virtual BOOL WriteWCHARs(const WCHAR* pw, UINT32 Count);
 
 	virtual	BOOL WriteCoord(const DocCoord& Coord);
 	virtual	BOOL WriteCoordTrans(const DocCoord& Coord,INT32 dx,INT32 dy);
@@ -168,8 +169,8 @@
 	virtual	BOOL WriteYOrd(INT32 YOrdinate);
 	virtual BOOL WriteCCPanose(const CCPanose &MyCCPanose);
 
-	virtual	BOOL WriteASCII(TCHAR* pStr);
-	virtual	BOOL WriteUnicode(TCHAR* pStr);
+	virtual	BOOL WriteASCII(const TCHAR* pStr);
+	virtual	BOOL WriteUnicode(const TCHAR* pStr);
 PORTNOTE("other","WriteBSTR removed - Windows concept")
 #ifndef EXCLUDE_FROM_XARALX
 	virtual	BOOL WriteBSTR(_bstr_t bstr);
Index: Trunk/XaraLX/Kernel/camfiltr.cpp
===================================================================
--- Trunk/XaraLX/Kernel/camfiltr.cpp	(revision 1236)
+++ Trunk/XaraLX/Kernel/camfiltr.cpp	(revision 1237)
@@ -232,13 +232,6 @@
 CC_IMPLEMENT_MEMDUMP(InsertLevelStack,List);
 CC_IMPLEMENT_MEMDUMP(InsertLevelStackItem,ListItem);
 
-CC_IMPLEMENT_MEMDUMP(AtomicTagListItem,ListItem)
-CC_IMPLEMENT_MEMDUMP(EssentialTagListItem,ListItem)
-CC_IMPLEMENT_MEMDUMP(TagDescriptionListItem,ListItem)
-CC_IMPLEMENT_MEMDUMP(AtomicTagList,List)
-CC_IMPLEMENT_MEMDUMP(EssentialTagList,List)
-CC_IMPLEMENT_MEMDUMP(TagDescriptionList,List)
-
 CC_IMPLEMENT_MEMDUMP(CXaraFilePathRecordRefListItem,ListItem)
 CC_IMPLEMENT_MEMDUMP(CXaraFilePathRecordRefList,List)
 // WEBSTER - markn 31/1/97
Index: Trunk/XaraLX/Kernel/cxfrech.h
===================================================================
--- Trunk/XaraLX/Kernel/cxfrech.h	(revision 1236)
+++ Trunk/XaraLX/Kernel/cxfrech.h	(revision 1237)
@@ -273,8 +273,9 @@
 	BOOL AddTagDescription(TagDescriptionListItem* pItem);
 	TagDescriptionListItem* GetTagDescription(UINT32 Tag);
 
-	BOOL SetDocumentNudgeSize(UINT32 newVal);
+	BOOL UnrecognisedTag(UINT32 Tag);
 
+	BOOL SetDocumentNudgeSize(UINT32 newVal);
 #endif
 
 	void AddAtomicTag(AtomicTagListItem* pItem);
@@ -283,8 +284,6 @@
 	BOOL IsTagInAtomicList(UINT32 Tag);
 	BOOL IsTagInEssentialList(UINT32 Tag);
 
-	BOOL UnrecognisedTag(UINT32 Tag);
-
 #if !defined(EXCLUDE_FROM_XARLIB)
 	// Path record references
 	void		AddPathRecordRefToList(NodePath* pNodePath, UINT32 RecordNumber);
Index: Trunk/XaraLX/Kernel/cxfrec.cpp
===================================================================
--- Trunk/XaraLX/Kernel/cxfrec.cpp	(revision 1236)
+++ Trunk/XaraLX/Kernel/cxfrec.cpp	(revision 1237)
@@ -123,9 +123,7 @@
 #endif
 
 CC_IMPLEMENT_DYNAMIC(CXaraFileRecord,CCObject);
-#if !defined(EXCLUDE_FROM_XARLIB)
 CC_IMPLEMENT_DYNAMIC(CamelotFileRecord,CXaraFileRecord);
-#endif
 
 // This will get Camelot to display the filename and linenumber of any memory allocations
 // that are not released at program exit
@@ -685,6 +683,16 @@
 	return (ok);
 }
 
+BOOL CXaraFileRecord::WriteWCHARs(const WCHAR* pw, UINT32 Count)
+{
+	BOOL ok = TRUE;
+	UINT32 i;
+	for (i = 0; ok && i < Count; i++)
+		ok = WriteWCHAR(pw[i]);
+	return (ok);
+}
+
+
 /********************************************************************************************
 
 >	BOOL CXaraFileRecord::WriteCoord(const DocCoord& Coord)
@@ -846,7 +854,7 @@
 
 /********************************************************************************************
 
->	BOOL CXaraFileRecord::WriteUnicode(TCHAR* pStr)
+>	BOOL CXaraFileRecord::WriteUnicode(const TCHAR* pStr)
 
 	Author:		Mark_Neves (Xara Group Ltd) <camelotdev@xxxxxxxx>
 	Created:	23/5/96
@@ -859,7 +867,7 @@
 
 ********************************************************************************************/
 
-BOOL CXaraFileRecord::WriteUnicode(TCHAR* pStr)
+BOOL CXaraFileRecord::WriteUnicode(const TCHAR* pStr)
 {
 	ERROR3IF(pStr == NULL,"NULL pStr");
 	if (pStr == NULL)
@@ -930,7 +938,7 @@
 
 /********************************************************************************************
 
->	BOOL CXaraFileRecord::WriteASCII(TCHAR* pStr)
+>	BOOL CXaraFileRecord::WriteASCII(const TCHAR* pStr)
 
 	Author:		Mark_Neves (Xara Group Ltd) <camelotdev@xxxxxxxx>
 	Created:	23/5/96
@@ -943,7 +951,7 @@
 
 ********************************************************************************************/
 
-BOOL CXaraFileRecord::WriteASCII(TCHAR* pStr)
+BOOL CXaraFileRecord::WriteASCII(const TCHAR* pStr)
 {
 	ERROR3IF(pStr == NULL,"NULL pStr");
 	if (pStr == NULL)
Index: Trunk/XaraLX/wxOil/makemsg.cpp
===================================================================
--- Trunk/XaraLX/wxOil/makemsg.cpp	(revision 1236)
+++ Trunk/XaraLX/wxOil/makemsg.cpp	(revision 1237)
@@ -107,7 +107,6 @@
 #include "camtypes.h"
 #include "basestr.h"
 #include "ensure.h"
-#include "helpuser.h"
 
 
 /**************************************************************************************
Index: Trunk/XaraLX/wxOil/filesize.cpp
===================================================================
--- Trunk/XaraLX/wxOil/filesize.cpp	(revision 1236)
+++ Trunk/XaraLX/wxOil/filesize.cpp	(revision 1237)
@@ -106,7 +106,6 @@
 #include "camtypes.h"
 #include "ensure.h"
 #include "ccfile.h"
-#include "sgliboil.h"	// For filesize fix
 
 DECLARE_SOURCE("$Revision$");
 
Index: Trunk/XaraLX/wxOil/stdwx.h
===================================================================
--- Trunk/XaraLX/wxOil/stdwx.h	(revision 1236)
+++ Trunk/XaraLX/wxOil/stdwx.h	(revision 1237)
@@ -176,8 +176,10 @@
 #include <malloc/malloc.h>
 #endif
 
+#if !defined(EXCLUDE_FROM_XARLIB)
 #include <libxml/tree.h>
 #include <libxml/parser.h>
+#endif
 
 #if wxUSE_DEBUGREPORT && wxUSE_XML
 #define HAVE_DEBUGREPORT
@@ -222,5 +224,7 @@
 #include "memdebug.h"
 #include "exception.h"
 #include "mfccontainer.h"
+
+#if !defined(EXCLUDE_FROM_XARLIB)
 #include "binreloc.h"
-
+#endif


Xara