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

[XaraXtreme-commits] Commit Complete



Commit by  : builder1
Repository : xara
Revision   : 1314
Date       : Wed Jun 14 09:58:58 BST 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/ai5_eps.cpp
   M /Trunk/XaraLX/Kernel/ai8_eps.cpp
   M /Trunk/XaraLX/Kernel/ai_eps.cpp
   M /Trunk/XaraLX/Kernel/freeeps.cpp
   M /Trunk/XaraLX/Kernel/swfexpdc.cpp

Make some type conversions explicit, to enable Gcc 3.3.6 compile


Diff:
Index: Trunk/XaraLX/Kernel/swfexpdc.cpp
===================================================================
--- Trunk/XaraLX/Kernel/swfexpdc.cpp	(revision 1313)
+++ Trunk/XaraLX/Kernel/swfexpdc.cpp	(revision 1314)
@@ -704,7 +704,7 @@
 
 	// Calculate the difference between the original curve and the generated curve. This
 	// creates it as 5% of the diagonal of the bounding box.
-	Tolerance = ( sqrt ( ( Bounds.hi.x * Bounds.hi.x ) + ( Bounds.hi.y * Bounds.hi.y ) ) ) / 20;
+	Tolerance = ( sqrt ( double( Bounds.hi.x * Bounds.hi.x ) + double( Bounds.hi.y * Bounds.hi.y ) ) ) / 20;
 
 	// Write the edge record.
 	WriteEdgeRecord ( Coords, &MoveTo, Verb, NumCoords, Lines, Fills, 0,
@@ -1109,8 +1109,8 @@
 		// it seems to be running properly. I suspect that the problem was that when
 		// an indefinate value is returned, the INT32 would be set as a strange value,
 		// which caused problems for the if... statement below.
-		double Distance = sqrt ( ( Difference.x * Difference.x )
-								 + ( Difference.y * Difference.y ) );
+		double Distance = sqrt ( double( Difference.x * Difference.x )
+								 + double( Difference.y * Difference.y ) );
 
 		// I've been having trouble with values of Distance where it's an infinite value,
 		// which Visual C stores as -1.#IND. This should keep it under control
Index: Trunk/XaraLX/Kernel/freeeps.cpp
===================================================================
--- Trunk/XaraLX/Kernel/freeeps.cpp	(revision 1313)
+++ Trunk/XaraLX/Kernel/freeeps.cpp	(revision 1314)
@@ -388,7 +388,8 @@
 
 		// Return TRUE if this file was created by Illustrator, or has been exported in 
 		// Illustrator format.
-		if (camStrncmp(Buffer, _T("%%Creator: "), 11) == 0 && camStrstr(Buffer, _T("FreeHand")) != 0)
+		if (camStrncmp( (const TCHAR *)Buffer, _T("%%Creator: "), 11) == 0 && 
+			camStrstr( (const TCHAR*)Buffer, _T("FreeHand")) != 0)
 		{
 			// found a plausible creator string - but it could be any version
 			// (3.0 for the Mac gives it's version number here, but the PC one doesn't)
Index: Trunk/XaraLX/Kernel/ai8_eps.cpp
===================================================================
--- Trunk/XaraLX/Kernel/ai8_eps.cpp	(revision 1313)
+++ Trunk/XaraLX/Kernel/ai8_eps.cpp	(revision 1314)
@@ -279,7 +279,7 @@
 				if (camStrncmp(Buffer, _T("%%Creator:"), 10) == 0)
 				{
 					// Found the creator line - does it contain the word Illustrator?
-					if (camStrstr(Buffer, _T("Illustrator(R) 8")) != NULL)
+					if (camStrstr( (const TCHAR*)Buffer, _T("Illustrator(R) 8")) != NULL)
 					{
 						HeaderFile.close();
 						return 10;
@@ -287,7 +287,7 @@
 					
 					// Try to see if it's Illustrator 9. Again, remove this code when you're
 					// writing a dedicated AI9 filter.
-					else if (camStrstr(Buffer, _T("Illustrator(R) 9")) != NULL)
+					else if (camStrstr( (const TCHAR*)Buffer, _T("Illustrator(R) 9")) != NULL)
 					{
 						HeaderFile.close();
 						return 9;
Index: Trunk/XaraLX/Kernel/ai_eps.cpp
===================================================================
--- Trunk/XaraLX/Kernel/ai_eps.cpp	(revision 1313)
+++ Trunk/XaraLX/Kernel/ai_eps.cpp	(revision 1314)
@@ -295,7 +295,7 @@
 				if (camStrncmp(Buffer, _T("%%Creator:"), 10) == 0)
 				{
 					// Found the creator line - does it contain the word Illustrator?
-					if (camStrstr(Buffer, _T("Illustrator")) != NULL)
+					if (camStrstr( (const TCHAR*)Buffer, _T("Illustrator")) != NULL)
 					{
 						HeaderFile.close();
 						return 9;
Index: Trunk/XaraLX/Kernel/ai5_eps.cpp
===================================================================
--- Trunk/XaraLX/Kernel/ai5_eps.cpp	(revision 1313)
+++ Trunk/XaraLX/Kernel/ai5_eps.cpp	(revision 1314)
@@ -305,20 +305,20 @@
 				if (camStrncmp(Buffer, _T("%%Creator:"), 10) == 0)
 				{
 					// Found the creator line - does it contain the word Illustrator?
-					if (camStrstr(Buffer, _T("Illustrator(TM) 5")) != NULL)
+					if (camStrstr( (const TCHAR*)Buffer, _T("Illustrator(TM) 5")) != NULL)
 					{
 						HeaderFile.close();
 						return 10;
 					}
 					// we'll accept version 7.0 as well
-					else if ((camStrstr(Buffer, _T("Illustrator(TM) 7")) != NULL) ||
-							 (camStrstr(Buffer, _T("Illustrator(R) 7")) != NULL))
+					else if ((camStrstr( (const TCHAR*)Buffer, _T("Illustrator(TM) 7")) != NULL) ||
+							 (camStrstr( (const TCHAR*)Buffer, _T("Illustrator(R) 7")) != NULL))
 					{
 						HeaderFile.close();
 						return 10;
 					}
 					// Catch FreeHand generated EPS files.
-					else if (camStrstr(Buffer, _T("FreeHand")) != NULL)
+					else if (camStrstr( (const TCHAR*)Buffer, _T("FreeHand")) != NULL)
 					{
 						HeaderFile.close();
 						return 8;


Xara