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

[XaraXtreme-commits] Commit Complete



Commit by  : alex
Repository : xara
Revision   : 1333
Date       : Fri Jun 16 21:34:16 BST 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/colourix.cpp
   M /Trunk/XaraLX/wxOil/makemsg.cpp

Fix unnamed colours to output their ID in decimal in EPS
Added '%p' to MakeMsg


Diff:
Index: Trunk/XaraLX/Kernel/colourix.cpp
===================================================================
--- Trunk/XaraLX/Kernel/colourix.cpp	(revision 1332)
+++ Trunk/XaraLX/Kernel/colourix.cpp	(revision 1333)
@@ -910,7 +910,7 @@
 			{
 				Name = new String_64;
 				if (Name != NULL)
-					Name->_MakeMsg( TEXT("_#1%p"), this );
+					Name->_MakeMsg( TEXT("_#1%ld"), (UINT32)(UINT_PTR)(this) );
 			}
 
 			if (Name != NULL)
Index: Trunk/XaraLX/wxOil/makemsg.cpp
===================================================================
--- Trunk/XaraLX/wxOil/makemsg.cpp	(revision 1332)
+++ Trunk/XaraLX/wxOil/makemsg.cpp	(revision 1333)
@@ -213,7 +213,7 @@
 enum ArgType
 {
 	LITERAL, CHAR_ARG, SIGNED_INT_ARG, SIGNED_INT32_ARG, UNSIGNED_INT_ARG,
-	UNSIGNED_INT32_ARG, CHAR_POINTER_ARG, STRING_POINTER_ARG
+	UNSIGNED_INT32_ARG, CHAR_POINTER_ARG, STRING_POINTER_ARG, UINT_PTR_ARG
 };
 
 
@@ -336,6 +336,9 @@
 							case TEXT('d'):  case TEXT('i'):
 								kind = SIGNED_INT_ARG;
 								break;
+							case TEXT('p'): // a pointer
+								kind = UINT_PTR_ARG;
+								break;
 							case TEXT('u'): case TEXT('x'): case TEXT('X'):
 								kind = UNSIGNED_INT_ARG;
 								break;
@@ -466,6 +469,10 @@
 					case CHAR_POINTER_ARG:
 						camSnprintf(temp, 512, p->str, va_arg(va, LPCTSTR));
 						break;
+					// type 'p' a pointer
+					case UINT_PTR_ARG:
+						camSnprintf(temp, 512, p->str, va_arg(va, UINT_PTR));
+						break;
 					// type 'S' - a pointer to a StringBase.  First change the
 					// %S format specifier, which is our own, into a sprintf()
 					// compatible %s.  Note that the 'S' is always the last


Xara