[quake3-commits] r1539 - in trunk/code: qcommon sys
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Tue May 5 14:19:29 EDT 2009
Author: ludwig
Date: 2009-05-05 14:19:29 -0400 (Tue, 05 May 2009)
New Revision: 1539
Modified:
trunk/code/qcommon/common.c
trunk/code/qcommon/q_shared.h
trunk/code/sys/sys_main.c
Log:
define STRING and XSTRING in q_shared.h (#4054)
Modified: trunk/code/qcommon/common.c
===================================================================
--- trunk/code/qcommon/common.c 2009-05-04 07:10:42 UTC (rev 1538)
+++ trunk/code/qcommon/common.c 2009-05-05 18:19:29 UTC (rev 1539)
@@ -40,8 +40,6 @@
#define MIN_COMHUNKMEGS 56
#define DEF_COMHUNKMEGS 64
#define DEF_COMZONEMEGS 24
-#define XSTRING(x) STRING(x)
-#define STRING(x) #x
#define DEF_COMHUNKMEGS_S XSTRING(DEF_COMHUNKMEGS)
#define DEF_COMZONEMEGS_S XSTRING(DEF_COMZONEMEGS)
Modified: trunk/code/qcommon/q_shared.h
===================================================================
--- trunk/code/qcommon/q_shared.h 2009-05-04 07:10:42 UTC (rev 1538)
+++ trunk/code/qcommon/q_shared.h 2009-05-05 18:19:29 UTC (rev 1539)
@@ -174,6 +174,10 @@
#define NULL ((void *)0)
#endif
+#define STRING(s) #s
+// expand constants before stringifying them
+#define XSTRING(s) STRING(s)
+
#define MAX_QINT 0x7fffffff
#define MIN_QINT (-MAX_QINT-1)
Modified: trunk/code/sys/sys_main.c
===================================================================
--- trunk/code/sys/sys_main.c 2009-05-04 07:10:42 UTC (rev 1538)
+++ trunk/code/sys/sys_main.c 2009-05-05 18:19:29 UTC (rev 1539)
@@ -517,8 +517,6 @@
// Run time
const SDL_version *ver = SDL_Linked_Version( );
-#define STRING(s) #s
-#define XSTRING(s) STRING(s)
#define MINSDL_VERSION \
XSTRING(MINSDL_MAJOR) "." \
XSTRING(MINSDL_MINOR) "." \
More information about the quake3-commits
mailing list