(svn r1416) Print sensible information in SafeTileAdd() if gcc is used
authortron
Fri, 07 Jan 2005 17:47:29 +0000
changeset 928 ff043aaa348e
parent 927 28f45a22a564
child 929 1a071a06af3f
(svn r1416) Print sensible information in SafeTileAdd() if gcc is used
macros.h
misc.c
--- a/macros.h	Fri Jan 07 17:40:23 2005 +0000
+++ b/macros.h	Fri Jan 07 17:47:29 2005 +0000
@@ -87,7 +87,7 @@
 #	define TILE_ADD(x,y) ((x)+(y))
 #else
 #	if defined(__GNUC__)
-#		define TILE_ADD(x,y) (SafeTileAdd((x),(y), "??",  __FILE__, __LINE__))
+#		define TILE_ADD(x,y) (SafeTileAdd((x),(y), #x ", " #y,  __FILE__, __LINE__))
 #	else
 #		define TILE_ADD(x,y) (SafeTileAdd((x),(y), #x ## ", " ## #y,  __FILE__, __LINE__))
 #	endif
--- a/misc.c	Fri Jan 07 17:40:23 2005 +0000
+++ b/misc.c	Fri Jan 07 17:47:29 2005 +0000
@@ -740,7 +740,7 @@
 
 		sprintf(buf, "TILE_ADD(%s) when adding 0x%.4X and %d failed", exp, tile, add);
 #if !defined(_DEBUG) || !defined(_MSC_VER)
-		printf("%s\n", buf);
+		fprintf(stderr, "%s:%d %s\n", file, line, buf);
 #else
 		_assert(buf, (char*)file, line);
 #endif