diff options
author | ludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2009-05-05 18:19:29 +0000 |
---|---|---|
committer | ludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2009-05-05 18:19:29 +0000 |
commit | 574672e3a5f79887d6fed5e1e5e14e645b8eff72 (patch) | |
tree | b698e22e4c2285167831c57c9c4467bfb31c2bdc /code | |
parent | 9a3aafdf346bbfbb569f665c6ebff708192bfe5b (diff) | |
download | ioquake3-aero-574672e3a5f79887d6fed5e1e5e14e645b8eff72.tar.gz ioquake3-aero-574672e3a5f79887d6fed5e1e5e14e645b8eff72.zip |
define STRING and XSTRING in q_shared.h (#4054)
git-svn-id: svn://svn.icculus.org/quake3/trunk@1539 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code')
-rw-r--r-- | code/qcommon/common.c | 2 | ||||
-rw-r--r-- | code/qcommon/q_shared.h | 4 | ||||
-rw-r--r-- | code/sys/sys_main.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/code/qcommon/common.c b/code/qcommon/common.c index 7cdfa85..e8a95a5 100644 --- a/code/qcommon/common.c +++ b/code/qcommon/common.c @@ -40,8 +40,6 @@ int demo_protocols[] = #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) diff --git a/code/qcommon/q_shared.h b/code/qcommon/q_shared.h index 54b8bfb..99edd69 100644 --- a/code/qcommon/q_shared.h +++ b/code/qcommon/q_shared.h @@ -174,6 +174,10 @@ typedef int clipHandle_t; #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) diff --git a/code/sys/sys_main.c b/code/sys/sys_main.c index f2a05e6..eb49326 100644 --- a/code/sys/sys_main.c +++ b/code/sys/sys_main.c @@ -517,8 +517,6 @@ int main( int argc, char **argv ) // 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) "." \ |