[openjk] 05/08: Fix some fallout from commit 03235915
Simon McVittie
smcv at debian.org
Mon Apr 27 21:28:42 UTC 2015
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch master
in repository openjk.
commit a7841666f86b1c60d60ba99e2a3f60fde6d732b7
Author: Simon McVittie <smcv at debian.org>
Date: Mon Apr 27 09:29:47 2015 +0100
Fix some fallout from commit 03235915
---
...renderer-and-clients-to-a-bunch-of-unnece.patch | 12 +-
...tokenizer-include-cstring-for-strcmp-memc.patch | 21 +
...P-JK2-g_savegame-silence-compiler-warning.patch | 49 +++
.../Select-C-11-mode-when-compiling-with-g.patch | 25 ++
.../Use-C-11-compliant-string-concatenation.patch | 466 +++++++++++++++++++++
...ep-or-Sys_Sleep-in-SP-to-avoid-busy-waiti.patch | 12 +-
.../codeJK2-replace-__cdecl-with-QDECL.patch | 34 ++
debian/patches/series | 5 +
8 files changed, 612 insertions(+), 12 deletions(-)
diff --git a/debian/patches/Don-t-link-renderer-and-clients-to-a-bunch-of-unnece.patch b/debian/patches/Don-t-link-renderer-and-clients-to-a-bunch-of-unnece.patch
index d62d724..225851c 100644
--- a/debian/patches/Don-t-link-renderer-and-clients-to-a-bunch-of-unnece.patch
+++ b/debian/patches/Don-t-link-renderer-and-clients-to-a-bunch-of-unnece.patch
@@ -11,10 +11,10 @@ They only directly use libGL.
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/code/rd-vanilla/CMakeLists.txt b/code/rd-vanilla/CMakeLists.txt
-index b7a2d79..8808618 100644
+index 5cd7c34..53b9c02 100644
--- a/code/rd-vanilla/CMakeLists.txt
+++ b/code/rd-vanilla/CMakeLists.txt
-@@ -177,7 +177,7 @@ if(BuildSPRdVanilla OR BuildJK2SPRdVanilla)
+@@ -195,7 +195,7 @@ if(BuildSPRdVanilla OR BuildJK2SPRdVanilla)
find_package(OpenGL REQUIRED)
set(SPRDVanillaRendererIncludeDirectories ${SPRDVanillaRendererIncludeDirectories} ${OPENGL_INCLUDE_DIR})
@@ -24,10 +24,10 @@ index b7a2d79..8808618 100644
set(SPRDVanillaRendererIncludeDirectories ${SPRDVanillaRendererIncludeDirectories} ${OpenJKLibDir})
diff --git a/codemp/CMakeLists.txt b/codemp/CMakeLists.txt
-index 4082f93..b0a1ae9 100644
+index 31a80d5..b67389b 100644
--- a/codemp/CMakeLists.txt
+++ b/codemp/CMakeLists.txt
-@@ -349,7 +349,7 @@ if(BuildMPEngine)
+@@ -367,7 +367,7 @@ if(BuildMPEngine)
# OpenGL
find_package(OpenGL REQUIRED)
set(MPEngineIncludeDirectories ${MPEngineIncludeDirectories} ${OPENGL_INCLUDE_DIR})
@@ -37,10 +37,10 @@ index 4082f93..b0a1ae9 100644
# OpenAL (is optionally included for Windows)
diff --git a/codemp/rd-vanilla/CMakeLists.txt b/codemp/rd-vanilla/CMakeLists.txt
-index 72c8e67..464b465 100644
+index d0f959c..474aa81 100644
--- a/codemp/rd-vanilla/CMakeLists.txt
+++ b/codemp/rd-vanilla/CMakeLists.txt
-@@ -162,7 +162,7 @@ endif()
+@@ -180,7 +180,7 @@ endif()
find_package(OpenGL REQUIRED)
set(MPVanillaRendererIncludeDirectories ${MPVanillaRendererIncludeDirectories} ${OPENGL_INCLUDE_DIR})
diff --git a/debian/patches/JK2-icarus-tokenizer-include-cstring-for-strcmp-memc.patch b/debian/patches/JK2-icarus-tokenizer-include-cstring-for-strcmp-memc.patch
new file mode 100644
index 0000000..ab54047
--- /dev/null
+++ b/debian/patches/JK2-icarus-tokenizer-include-cstring-for-strcmp-memc.patch
@@ -0,0 +1,21 @@
+From: Simon McVittie <smcv at debian.org>
+Date: Mon, 27 Apr 2015 10:00:57 +0100
+Subject: JK2: icarus tokenizer: #include <cstring> for strcmp, memcpy
+
+Bug: https://github.com/JACoders/OpenJK/pull/658
+---
+ codeJK2/icarus/tokenizer.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/codeJK2/icarus/tokenizer.h b/codeJK2/icarus/tokenizer.h
+index 70e83de..cc8d5d7 100644
+--- a/codeJK2/icarus/tokenizer.h
++++ b/codeJK2/icarus/tokenizer.h
+@@ -26,6 +26,7 @@ along with this program; if not, see <http://www.gnu.org/licenses/>.
+ #define __TOKENIZER_H
+
+ #include <cstdint>
++#include <cstring>
+ #include <string>
+ #include <vector>
+ #include <map>
diff --git a/debian/patches/SP-JK2-g_savegame-silence-compiler-warning.patch b/debian/patches/SP-JK2-g_savegame-silence-compiler-warning.patch
new file mode 100644
index 0000000..5753054
--- /dev/null
+++ b/debian/patches/SP-JK2-g_savegame-silence-compiler-warning.patch
@@ -0,0 +1,49 @@
+From: Simon McVittie <smcv at debian.org>
+Date: Mon, 27 Apr 2015 09:55:03 +0100
+Subject: SP, JK2: g_savegame: silence compiler warning
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+.../code/game/g_savegame.cpp: In function ‘void
+EnumerateFields(const save_field_t*, const byte*, unsigned int, int)’:
+.../code/game/g_savegame.cpp:512:22: warning: comparison between
+signed and unsigned integer expressions [-Wsign-compare]
+ assert(pField->iOffset < iLen);
+ ^
+
+iLen is a non-negative amount of memory, so size_t is a more
+appropriate type than int.
+
+Bug: https://github.com/JACoders/OpenJK/pull/658
+---
+ code/game/g_savegame.cpp | 2 +-
+ codeJK2/game/g_savegame.cpp | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/code/game/g_savegame.cpp b/code/game/g_savegame.cpp
+index db3ddf6..9a0e603 100644
+--- a/code/game/g_savegame.cpp
++++ b/code/game/g_savegame.cpp
+@@ -499,7 +499,7 @@ static void EnumerateField(const save_field_t *pField, const byte *pbBase)
+ }
+ }
+
+-static void EnumerateFields(const save_field_t *pFields, const byte *pbData, unsigned int ulChid, int iLen)
++static void EnumerateFields(const save_field_t *pFields, const byte *pbData, unsigned int ulChid, size_t iLen)
+ {
+ strList = new std::list<sstring_t>;
+
+diff --git a/codeJK2/game/g_savegame.cpp b/codeJK2/game/g_savegame.cpp
+index 43013ec..22030ea 100644
+--- a/codeJK2/game/g_savegame.cpp
++++ b/codeJK2/game/g_savegame.cpp
+@@ -441,7 +441,7 @@ void EnumerateField(const field_t *pField, byte *pbBase)
+ }
+ }
+
+-static void EnumerateFields(const field_t *pFields, byte *pbData, unsigned int ulChid, int iLen)
++static void EnumerateFields(const field_t *pFields, byte *pbData, unsigned int ulChid, size_t iLen)
+ {
+ strList = new list<sstring_t>;
+
diff --git a/debian/patches/Select-C-11-mode-when-compiling-with-g.patch b/debian/patches/Select-C-11-mode-when-compiling-with-g.patch
new file mode 100644
index 0000000..5e39de4
--- /dev/null
+++ b/debian/patches/Select-C-11-mode-when-compiling-with-g.patch
@@ -0,0 +1,25 @@
+From: Simon McVittie <smcv at debian.org>
+Date: Mon, 27 Apr 2015 09:24:25 +0100
+Subject: Select C++11 mode when compiling with g++
+
+This is required for <cstdint>, which is used by codeJK2 since
+commit 03235915.
+
+Bug: https://github.com/JACoders/OpenJK/pull/658
+---
+ CMakeLists.txt | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0bd140b..8e8549d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -199,6 +199,8 @@ else()
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-comment")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden")
++ # for <cstdint>
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
+ if (Architecture STREQUAL "arm")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-char")
+ else()
diff --git a/debian/patches/Use-C-11-compliant-string-concatenation.patch b/debian/patches/Use-C-11-compliant-string-concatenation.patch
new file mode 100644
index 0000000..41c96c4
--- /dev/null
+++ b/debian/patches/Use-C-11-compliant-string-concatenation.patch
@@ -0,0 +1,466 @@
+From: Simon McVittie <smcv at debian.org>
+Date: Mon, 27 Apr 2015 09:46:52 +0100
+Subject: Use C++11-compliant string concatenation
+
+C++11 reserves syntax like X"foo" and "foo"X for future syntax like
+L"a wide-char string", so concatenating macros with literals now
+requires an intervening space.
+
+Bug: https://github.com/JACoders/OpenJK/pull/658
+---
+ code/client/cl_keys.cpp | 4 ++--
+ code/qcommon/common.cpp | 10 +++++-----
+ code/qcommon/cvar.cpp | 18 +++++++++---------
+ code/qcommon/stv_version.h | 6 +++---
+ codemp/client/cl_cgameapi.cpp | 2 +-
+ codemp/client/cl_keys.cpp | 4 ++--
+ codemp/client/cl_uiapi.cpp | 2 +-
+ codemp/game/NPC_spawn.c | 6 +++---
+ codemp/game/g_client.c | 4 ++--
+ codemp/game/w_force.c | 2 +-
+ codemp/qcommon/common.cpp | 10 +++++-----
+ codemp/qcommon/cvar.cpp | 18 +++++++++---------
+ codemp/qcommon/game_version.h | 8 ++++----
+ codemp/qcommon/vm.cpp | 4 ++--
+ codemp/server/sv_ccmds.cpp | 8 ++++----
+ codemp/server/sv_gameapi.cpp | 2 +-
+ 16 files changed, 54 insertions(+), 54 deletions(-)
+
+diff --git a/code/client/cl_keys.cpp b/code/client/cl_keys.cpp
+index c694bd0..3e57df4 100644
+--- a/code/client/cl_keys.cpp
++++ b/code/client/cl_keys.cpp
+@@ -1026,7 +1026,7 @@ void Key_Bind_f( void ) {
+
+ if ( c == 2 ) {
+ if ( kg.keys[b].binding && kg.keys[b].binding[0] )
+- Com_Printf( S_COLOR_GREY"Bind "S_COLOR_WHITE"%s = "S_COLOR_GREY"\""S_COLOR_WHITE"%s"S_COLOR_GREY"\""S_COLOR_WHITE"\n", Key_KeynumToString( b ), kg.keys[b].binding );
++ Com_Printf( S_COLOR_GREY "Bind " S_COLOR_WHITE "%s = " S_COLOR_GREY "\"" S_COLOR_WHITE "%s" S_COLOR_GREY "\"" S_COLOR_WHITE "\n", Key_KeynumToString( b ), kg.keys[b].binding );
+ else
+ Com_Printf( "\"%s\" is not bound\n", Key_KeynumToString( b ) );
+ return;
+@@ -1066,7 +1066,7 @@ Key_Bindlist_f
+ void Key_Bindlist_f( void ) {
+ for ( size_t i=0; i<MAX_KEYS; i++ ) {
+ if ( kg.keys[i].binding && kg.keys[i].binding[0] )
+- Com_Printf( S_COLOR_GREY"Key "S_COLOR_WHITE"%s (%s) = "S_COLOR_GREY"\""S_COLOR_WHITE"%s"S_COLOR_GREY"\""S_COLOR_WHITE"\n", Key_KeynumToAscii( i ), Key_KeynumToString( i ), kg.keys[i].binding );
++ Com_Printf( S_COLOR_GREY "Key " S_COLOR_WHITE "%s (%s) = " S_COLOR_GREY "\"" S_COLOR_WHITE "%s" S_COLOR_GREY "\"" S_COLOR_WHITE "\n", Key_KeynumToAscii( i ), Key_KeynumToString( i ), kg.keys[i].binding );
+ }
+ }
+
+diff --git a/code/qcommon/common.cpp b/code/qcommon/common.cpp
+index b83dab5..e84a88a 100644
+--- a/code/qcommon/common.cpp
++++ b/code/qcommon/common.cpp
+@@ -1654,7 +1654,7 @@ PrintMatches
+ */
+ static void PrintMatches( const char *s ) {
+ if ( !Q_stricmpn( s, shortestMatch, strlen( shortestMatch ) ) ) {
+- Com_Printf( S_COLOR_GREY"Cmd "S_COLOR_WHITE"%s\n", s );
++ Com_Printf( S_COLOR_GREY "Cmd " S_COLOR_WHITE "%s\n", s );
+ }
+ }
+
+@@ -1668,7 +1668,7 @@ PrintArgMatches
+ // This is here for if ever commands with other argument completion
+ static void PrintArgMatches( const char *s ) {
+ if ( !Q_stricmpn( s, shortestMatch, strlen( shortestMatch ) ) ) {
+- Com_Printf( S_COLOR_WHITE" %s\n", s );
++ Com_Printf( S_COLOR_WHITE " %s\n", s );
+ }
+ }
+ #endif
+@@ -1681,7 +1681,7 @@ PrintKeyMatches
+ */
+ static void PrintKeyMatches( const char *s ) {
+ if ( !Q_stricmpn( s, shortestMatch, strlen( shortestMatch ) ) ) {
+- Com_Printf( S_COLOR_GREY"Key "S_COLOR_WHITE"%s\n", s );
++ Com_Printf( S_COLOR_GREY "Key " S_COLOR_WHITE "%s\n", s );
+ }
+ }
+
+@@ -1693,7 +1693,7 @@ PrintFileMatches
+ */
+ static void PrintFileMatches( const char *s ) {
+ if ( !Q_stricmpn( s, shortestMatch, strlen( shortestMatch ) ) ) {
+- Com_Printf( S_COLOR_GREY"File "S_COLOR_WHITE"%s\n", s );
++ Com_Printf( S_COLOR_GREY "File " S_COLOR_WHITE "%s\n", s );
+ }
+ }
+
+@@ -1708,7 +1708,7 @@ static void PrintCvarMatches( const char *s ) {
+
+ if ( !Q_stricmpn( s, shortestMatch, (int)strlen( shortestMatch ) ) ) {
+ Com_TruncateLongString( value, Cvar_VariableString( s ) );
+- Com_Printf( S_COLOR_GREY"Cvar "S_COLOR_WHITE"%s = "S_COLOR_GREY"\""S_COLOR_WHITE"%s"S_COLOR_GREY"\""S_COLOR_WHITE"\n", s, value );
++ Com_Printf( S_COLOR_GREY "Cvar " S_COLOR_WHITE "%s = " S_COLOR_GREY "\"" S_COLOR_WHITE "%s" S_COLOR_GREY "\"" S_COLOR_WHITE "\n", s, value );
+ }
+ }
+
+diff --git a/code/qcommon/cvar.cpp b/code/qcommon/cvar.cpp
+index e4e71a9..db52984 100644
+--- a/code/qcommon/cvar.cpp
++++ b/code/qcommon/cvar.cpp
+@@ -489,19 +489,19 @@ Prints the value, default, and latched string of the given variable
+ ============
+ */
+ void Cvar_Print( cvar_t *v ) {
+- Com_Printf( S_COLOR_GREY"Cvar "S_COLOR_WHITE"%s = "S_COLOR_GREY"\""S_COLOR_WHITE"%s"S_COLOR_GREY"\""S_COLOR_WHITE, v->name, v->string );
++ Com_Printf( S_COLOR_GREY "Cvar " S_COLOR_WHITE "%s = " S_COLOR_GREY "\"" S_COLOR_WHITE "%s" S_COLOR_GREY "\"" S_COLOR_WHITE, v->name, v->string );
+
+ if ( !(v->flags & CVAR_ROM) ) {
+ if ( !Q_stricmp( v->string, v->resetString ) )
+- Com_Printf( ", "S_COLOR_WHITE"the default" );
++ Com_Printf( ", " S_COLOR_WHITE "the default" );
+ else
+- Com_Printf( ", "S_COLOR_WHITE"default = "S_COLOR_GREY"\""S_COLOR_WHITE"%s"S_COLOR_GREY"\""S_COLOR_WHITE, v->resetString );
++ Com_Printf( ", " S_COLOR_WHITE "default = " S_COLOR_GREY"\"" S_COLOR_WHITE "%s" S_COLOR_GREY "\"" S_COLOR_WHITE, v->resetString );
+ }
+
+ Com_Printf( "\n" );
+
+ if ( v->latchedString )
+- Com_Printf( " latched = "S_COLOR_GREY"\""S_COLOR_WHITE"%s"S_COLOR_GREY"\"\n", v->latchedString );
++ Com_Printf( " latched = " S_COLOR_GREY "\"" S_COLOR_WHITE "%s" S_COLOR_GREY "\"\n", v->latchedString );
+ }
+
+ /*
+@@ -969,9 +969,9 @@ void Cvar_List_f( void ) {
+ if (var->flags & CVAR_CHEAT) Com_Printf( "C" ); else Com_Printf( " " );
+ if (var->flags & CVAR_USER_CREATED) Com_Printf( "?" ); else Com_Printf( " " );
+
+- Com_Printf( S_COLOR_WHITE" %s = "S_COLOR_GREY"\""S_COLOR_WHITE"%s"S_COLOR_GREY"\""S_COLOR_WHITE, var->name, var->string );
++ Com_Printf( S_COLOR_WHITE " %s = " S_COLOR_GREY "\"" S_COLOR_WHITE "%s" S_COLOR_GREY "\"" S_COLOR_WHITE, var->name, var->string );
+ if ( var->latchedString )
+- Com_Printf( ", latched = "S_COLOR_GREY"\""S_COLOR_WHITE"%s"S_COLOR_GREY"\""S_COLOR_WHITE, var->latchedString );
++ Com_Printf( ", latched = " S_COLOR_GREY "\"" S_COLOR_WHITE "%s" S_COLOR_GREY "\"" S_COLOR_WHITE, var->latchedString );
+ Com_Printf( "\n" );
+ }
+
+@@ -1008,9 +1008,9 @@ void Cvar_ListModified_f( void ) {
+ {
+ char *value = (*itr)->latchedString ? (*itr)->latchedString : (*itr)->string;
+
+- Com_Printf( S_COLOR_GREY"Cvar "
+- S_COLOR_WHITE"%s = "S_COLOR_GREY"\""S_COLOR_WHITE"%s"S_COLOR_GREY"\""S_COLOR_WHITE", "
+- S_COLOR_WHITE"default = "S_COLOR_GREY"\""S_COLOR_WHITE"%s"S_COLOR_GREY"\""S_COLOR_WHITE"\n",
++ Com_Printf( S_COLOR_GREY "Cvar "
++ S_COLOR_WHITE "%s = " S_COLOR_GREY "\"" S_COLOR_WHITE "%s" S_COLOR_GREY "\"" S_COLOR_WHITE ", "
++ S_COLOR_WHITE "default = " S_COLOR_GREY "\"" S_COLOR_WHITE "%s" S_COLOR_GREY "\"" S_COLOR_WHITE "\n",
+ (*itr)->name, value, (*itr)->resetString );
+ }
+ }
+diff --git a/code/qcommon/stv_version.h b/code/qcommon/stv_version.h
+index a4a2a03..be9f98c 100644
+--- a/code/qcommon/stv_version.h
++++ b/code/qcommon/stv_version.h
+@@ -24,11 +24,11 @@ along with this program; if not, see <http://www.gnu.org/licenses/>.
+ #include "../win32/AutoVersion.h"
+
+ #ifdef _DEBUG
+- #define Q3_VERSION "(debug)OpenJK: v"VERSION_STRING_DOTTED
++ #define Q3_VERSION "(debug)OpenJK: v" VERSION_STRING_DOTTED
+ #elif defined FINAL_BUILD
+- #define Q3_VERSION "OpenJK: v"VERSION_STRING_DOTTED
++ #define Q3_VERSION "OpenJK: v" VERSION_STRING_DOTTED
+ #else
+- #define Q3_VERSION "(internal)OpenJK: v"VERSION_STRING_DOTTED
++ #define Q3_VERSION "(internal)OpenJK: v" VERSION_STRING_DOTTED
+ #endif
+ // end
+
+diff --git a/codemp/client/cl_cgameapi.cpp b/codemp/client/cl_cgameapi.cpp
+index d3df9bf..4d90f44 100644
+--- a/codemp/client/cl_cgameapi.cpp
++++ b/codemp/client/cl_cgameapi.cpp
+@@ -1647,7 +1647,7 @@ void CL_BindCGame( void ) {
+ static cgameImport_t cgi;
+ cgameExport_t *ret;
+ GetCGameAPI_t GetCGameAPI;
+- char dllName[MAX_OSPATH] = "cgame"ARCH_STRING DLL_EXT;
++ char dllName[MAX_OSPATH] = "cgame" ARCH_STRING DLL_EXT;
+
+ memset( &cgi, 0, sizeof( cgi ) );
+
+diff --git a/codemp/client/cl_keys.cpp b/codemp/client/cl_keys.cpp
+index 4e24942..93fb8df 100644
+--- a/codemp/client/cl_keys.cpp
++++ b/codemp/client/cl_keys.cpp
+@@ -1085,7 +1085,7 @@ void Key_Bind_f( void ) {
+
+ if ( c == 2 ) {
+ if ( kg.keys[b].binding && kg.keys[b].binding[0] )
+- Com_Printf( S_COLOR_GREY"Bind "S_COLOR_WHITE"%s = "S_COLOR_GREY"\""S_COLOR_WHITE"%s"S_COLOR_GREY"\""S_COLOR_WHITE"\n", Key_KeynumToString( b ), kg.keys[b].binding );
++ Com_Printf( S_COLOR_GREY "Bind " S_COLOR_WHITE "%s = " S_COLOR_GREY "\"" S_COLOR_WHITE "%s" S_COLOR_GREY "\"" S_COLOR_WHITE "\n", Key_KeynumToString( b ), kg.keys[b].binding );
+ else
+ Com_Printf( "\"%s\" is not bound\n", Key_KeynumToString( b ) );
+ return;
+@@ -1125,7 +1125,7 @@ Key_Bindlist_f
+ void Key_Bindlist_f( void ) {
+ for ( size_t i=0; i<MAX_KEYS; i++ ) {
+ if ( kg.keys[i].binding && kg.keys[i].binding[0] )
+- Com_Printf( S_COLOR_GREY"Key "S_COLOR_WHITE"%s (%s) = "S_COLOR_GREY"\""S_COLOR_WHITE"%s"S_COLOR_GREY"\""S_COLOR_WHITE"\n", Key_KeynumToAscii( i ), Key_KeynumToString( i ), kg.keys[i].binding );
++ Com_Printf( S_COLOR_GREY "Key " S_COLOR_WHITE "%s (%s) = " S_COLOR_GREY "\"" S_COLOR_WHITE "%s" S_COLOR_GREY "\"" S_COLOR_WHITE "\n", Key_KeynumToAscii( i ), Key_KeynumToString( i ), kg.keys[i].binding );
+ }
+ }
+
+diff --git a/codemp/client/cl_uiapi.cpp b/codemp/client/cl_uiapi.cpp
+index 1de9a59..8921aa6 100644
+--- a/codemp/client/cl_uiapi.cpp
++++ b/codemp/client/cl_uiapi.cpp
+@@ -1044,7 +1044,7 @@ void CL_BindUI( void ) {
+ static uiImport_t uii;
+ uiExport_t *ret;
+ GetUIAPI_t GetUIAPI;
+- char dllName[MAX_OSPATH] = "ui"ARCH_STRING DLL_EXT;
++ char dllName[MAX_OSPATH] = "ui" ARCH_STRING DLL_EXT;
+
+ memset( &uii, 0, sizeof( uii ) );
+
+diff --git a/codemp/game/NPC_spawn.c b/codemp/game/NPC_spawn.c
+index 4c17a4e..883550d 100644
+--- a/codemp/game/NPC_spawn.c
++++ b/codemp/game/NPC_spawn.c
+@@ -1419,7 +1419,7 @@ gentity_t *NPC_Spawn_Do( gentity_t *ent )
+
+ if ( newent == NULL )
+ {
+- Com_Printf ( S_COLOR_RED"ERROR: NPC G_Spawn failed\n" );
++ Com_Printf ( S_COLOR_RED "ERROR: NPC G_Spawn failed\n" );
+ return NULL;
+ }
+
+@@ -1428,7 +1428,7 @@ gentity_t *NPC_Spawn_Do( gentity_t *ent )
+ newent->NPC = New_NPC_t(newent->s.number);
+ if ( newent->NPC == NULL )
+ {
+- Com_Printf ( S_COLOR_RED"ERROR: NPC G_Alloc NPC failed\n" );
++ Com_Printf ( S_COLOR_RED "ERROR: NPC G_Alloc NPC failed\n" );
+ goto finish;
+ // return NULL;
+ }
+@@ -1451,7 +1451,7 @@ gentity_t *NPC_Spawn_Do( gentity_t *ent )
+
+ if ( newent->client == NULL )
+ {
+- Com_Printf ( S_COLOR_RED"ERROR: NPC BG_Alloc client failed\n" );
++ Com_Printf ( S_COLOR_RED "ERROR: NPC BG_Alloc client failed\n" );
+ goto finish;
+ // return NULL;
+ }
+diff --git a/codemp/game/g_client.c b/codemp/game/g_client.c
+index d2a2c57..80cc113 100644
+--- a/codemp/game/g_client.c
++++ b/codemp/game/g_client.c
+@@ -2160,7 +2160,7 @@ qboolean ClientUserinfoChanged( int clientNum ) {
+ Q_StripColor( client->pers.netname_nocolor );
+ }
+ else {
+- trap->SendServerCommand( -1, va( "print \"%s"S_COLOR_WHITE" %s %s\n\"", oldname, G_GetStringEdString( "MP_SVGAME", "PLRENAME" ), client->pers.netname ) );
++ trap->SendServerCommand( -1, va( "print \"%s" S_COLOR_WHITE " %s %s\n\"", oldname, G_GetStringEdString( "MP_SVGAME", "PLRENAME" ), client->pers.netname ) );
+ G_LogPrintf( "ClientRename: %i [%s] (%s) \"%s^7\" -> \"%s^7\"\n", clientNum, ent->client->sess.IP, ent->client->pers.guid, oldname, ent->client->pers.netname );
+ client->pers.netnameTime = level.time + 5000;
+ }
+@@ -2316,7 +2316,7 @@ qboolean ClientUserinfoChanged( int clientNum ) {
+
+ s = Info_ValueForKey( userinfo, "snaps" );
+ if ( atoi( s ) < sv_fps.integer )
+- trap->SendServerCommand( clientNum, va( "print \""S_COLOR_YELLOW"Recommend setting /snaps %d or higher to match this server's sv_fps\n\"", sv_fps.integer ) );
++ trap->SendServerCommand( clientNum, va( "print \"" S_COLOR_YELLOW "Recommend setting /snaps %d or higher to match this server's sv_fps\n\"", sv_fps.integer ) );
+
+ // send over a subset of the userinfo keys so other clients can
+ // print scoreboards, display models, and play custom sounds
+diff --git a/codemp/game/w_force.c b/codemp/game/w_force.c
+index e2b1ca4..64e4f87 100644
+--- a/codemp/game/w_force.c
++++ b/codemp/game/w_force.c
+@@ -228,7 +228,7 @@ void WP_InitForcePowers( gentity_t *ent ) {
+
+ if ( strlen( forcePowers ) != DEFAULT_FORCEPOWERS_LEN ) {
+ Q_strncpyz( forcePowers, DEFAULT_FORCEPOWERS, sizeof( forcePowers ) );
+- trap->SendServerCommand( ent-g_entities, "print \""S_COLOR_RED"Invalid forcepowers string, setting default\n\"" );
++ trap->SendServerCommand( ent-g_entities, "print \"" S_COLOR_RED "Invalid forcepowers string, setting default\n\"" );
+ }
+
+ //if it's a bot just copy the info directly from its personality
+diff --git a/codemp/qcommon/common.cpp b/codemp/qcommon/common.cpp
+index 4b41207..4d5e577 100644
+--- a/codemp/qcommon/common.cpp
++++ b/codemp/qcommon/common.cpp
+@@ -1737,7 +1737,7 @@ PrintMatches
+ */
+ static void PrintMatches( const char *s ) {
+ if ( !Q_stricmpn( s, shortestMatch, strlen( shortestMatch ) ) ) {
+- Com_Printf( S_COLOR_GREY"Cmd "S_COLOR_WHITE"%s\n", s );
++ Com_Printf( S_COLOR_GREY "Cmd " S_COLOR_WHITE "%s\n", s );
+ }
+ }
+
+@@ -1751,7 +1751,7 @@ PrintArgMatches
+ // This is here for if ever commands with other argument completion
+ static void PrintArgMatches( const char *s ) {
+ if ( !Q_stricmpn( s, shortestMatch, strlen( shortestMatch ) ) ) {
+- Com_Printf( S_COLOR_WHITE" %s\n", s );
++ Com_Printf( S_COLOR_WHITE " %s\n", s );
+ }
+ }
+ #endif
+@@ -1765,7 +1765,7 @@ PrintKeyMatches
+ */
+ static void PrintKeyMatches( const char *s ) {
+ if ( !Q_stricmpn( s, shortestMatch, strlen( shortestMatch ) ) ) {
+- Com_Printf( S_COLOR_GREY"Key "S_COLOR_WHITE"%s\n", s );
++ Com_Printf( S_COLOR_GREY "Key " S_COLOR_WHITE "%s\n", s );
+ }
+ }
+ #endif
+@@ -1778,7 +1778,7 @@ PrintFileMatches
+ */
+ static void PrintFileMatches( const char *s ) {
+ if ( !Q_stricmpn( s, shortestMatch, strlen( shortestMatch ) ) ) {
+- Com_Printf( S_COLOR_GREY"File "S_COLOR_WHITE"%s\n", s );
++ Com_Printf( S_COLOR_GREY "File " S_COLOR_WHITE "%s\n", s );
+ }
+ }
+
+@@ -1793,7 +1793,7 @@ static void PrintCvarMatches( const char *s ) {
+
+ if ( !Q_stricmpn( s, shortestMatch, (int)strlen( shortestMatch ) ) ) {
+ Com_TruncateLongString( value, Cvar_VariableString( s ) );
+- Com_Printf( S_COLOR_GREY"Cvar "S_COLOR_WHITE"%s = "S_COLOR_GREY"\""S_COLOR_WHITE"%s"S_COLOR_GREY"\""S_COLOR_WHITE"\n", s, value );
++ Com_Printf( S_COLOR_GREY "Cvar " S_COLOR_WHITE "%s = " S_COLOR_GREY "\"" S_COLOR_WHITE "%s" S_COLOR_GREY "\"" S_COLOR_WHITE "\n", s, value );
+ }
+ }
+
+diff --git a/codemp/qcommon/cvar.cpp b/codemp/qcommon/cvar.cpp
+index b6f9691..1a648db 100644
+--- a/codemp/qcommon/cvar.cpp
++++ b/codemp/qcommon/cvar.cpp
+@@ -485,19 +485,19 @@ Prints the value, default, and latched string of the given variable
+ ============
+ */
+ void Cvar_Print( cvar_t *v ) {
+- Com_Printf( S_COLOR_GREY"Cvar "S_COLOR_WHITE"%s = "S_COLOR_GREY"\""S_COLOR_WHITE"%s"S_COLOR_GREY"\""S_COLOR_WHITE, v->name, v->string );
++ Com_Printf( S_COLOR_GREY "Cvar " S_COLOR_WHITE "%s = " S_COLOR_GREY "\"" S_COLOR_WHITE "%s" S_COLOR_GREY "\"" S_COLOR_WHITE, v->name, v->string );
+
+ if ( !(v->flags & CVAR_ROM) ) {
+ if ( !Q_stricmp( v->string, v->resetString ) )
+- Com_Printf( ", "S_COLOR_WHITE"the default" );
++ Com_Printf( ", " S_COLOR_WHITE "the default" );
+ else
+- Com_Printf( ", "S_COLOR_WHITE"default = "S_COLOR_GREY"\""S_COLOR_WHITE"%s"S_COLOR_GREY"\""S_COLOR_WHITE, v->resetString );
++ Com_Printf( ", " S_COLOR_WHITE "default = " S_COLOR_GREY "\"" S_COLOR_WHITE "%s" S_COLOR_GREY "\"" S_COLOR_WHITE, v->resetString );
+ }
+
+ Com_Printf( "\n" );
+
+ if ( v->latchedString )
+- Com_Printf( " latched = "S_COLOR_GREY"\""S_COLOR_WHITE"%s"S_COLOR_GREY"\"\n", v->latchedString );
++ Com_Printf( " latched = " S_COLOR_GREY "\"" S_COLOR_WHITE "%s" S_COLOR_GREY "\"\n", v->latchedString );
+ }
+
+ /*
+@@ -1088,9 +1088,9 @@ void Cvar_List_f( void ) {
+ if (var->flags & CVAR_CHEAT) Com_Printf( "C" ); else Com_Printf( " " );
+ if (var->flags & CVAR_USER_CREATED) Com_Printf( "?" ); else Com_Printf( " " );
+
+- Com_Printf( S_COLOR_WHITE" %s = "S_COLOR_GREY"\""S_COLOR_WHITE"%s"S_COLOR_GREY"\""S_COLOR_WHITE, var->name, var->string );
++ Com_Printf( S_COLOR_WHITE " %s = " S_COLOR_GREY "\"" S_COLOR_WHITE "%s" S_COLOR_GREY "\"" S_COLOR_WHITE, var->name, var->string );
+ if ( var->latchedString )
+- Com_Printf( ", latched = "S_COLOR_GREY"\""S_COLOR_WHITE"%s"S_COLOR_GREY"\""S_COLOR_WHITE, var->latchedString );
++ Com_Printf( ", latched = " S_COLOR_GREY "\"" S_COLOR_WHITE "%s" S_COLOR_GREY "\"" S_COLOR_WHITE, var->latchedString );
+ Com_Printf( "\n" );
+ }
+
+@@ -1127,9 +1127,9 @@ void Cvar_ListModified_f( void ) {
+ {
+ char *value = (*itr)->latchedString ? (*itr)->latchedString : (*itr)->string;
+
+- Com_Printf( S_COLOR_GREY"Cvar "
+- S_COLOR_WHITE"%s = "S_COLOR_GREY"\""S_COLOR_WHITE"%s"S_COLOR_GREY"\""S_COLOR_WHITE", "
+- S_COLOR_WHITE"default = "S_COLOR_GREY"\""S_COLOR_WHITE"%s"S_COLOR_GREY"\""S_COLOR_WHITE"\n",
++ Com_Printf( S_COLOR_GREY "Cvar "
++ S_COLOR_WHITE "%s = " S_COLOR_GREY "\"" S_COLOR_WHITE "%s" S_COLOR_GREY "\"" S_COLOR_WHITE ", "
++ S_COLOR_WHITE "default = " S_COLOR_GREY "\"" S_COLOR_WHITE "%s" S_COLOR_GREY "\"" S_COLOR_WHITE "\n",
+ (*itr)->name, value, (*itr)->resetString );
+ }
+ }
+diff --git a/codemp/qcommon/game_version.h b/codemp/qcommon/game_version.h
+index 032554d..a0988af 100644
+--- a/codemp/qcommon/game_version.h
++++ b/codemp/qcommon/game_version.h
+@@ -33,9 +33,9 @@ along with this program; if not, see <http://www.gnu.org/licenses/>.
+ #define VERSION_STRING_DOTTED STR(VERSION_MAJOR_RELEASE) "." STR(VERSION_MINOR_RELEASE) "." STR(VERSION_EXTERNAL_BUILD) "." STR(VERSION_INTERNAL_BUILD) // "a.b.c.d"
+
+ #if defined(_DEBUG)
+- #define JK_VERSION "(debug)OpenJK-MP: v"VERSION_STRING_DOTTED
+- #define JK_VERSION_OLD "(debug)JAmp: v"VERSION_STRING_DOTTED
++ #define JK_VERSION "(debug)OpenJK-MP: v" VERSION_STRING_DOTTED
++ #define JK_VERSION_OLD "(debug)JAmp: v" VERSION_STRING_DOTTED
+ #else
+- #define JK_VERSION "OpenJK-MP: v"VERSION_STRING_DOTTED
+- #define JK_VERSION_OLD "JAmp: v"VERSION_STRING_DOTTED
++ #define JK_VERSION "OpenJK-MP: v" VERSION_STRING_DOTTED
++ #define JK_VERSION_OLD "JAmp: v" VERSION_STRING_DOTTED
+ #endif
+diff --git a/codemp/qcommon/vm.cpp b/codemp/qcommon/vm.cpp
+index 4352b85..c1f810d 100644
+--- a/codemp/qcommon/vm.cpp
++++ b/codemp/qcommon/vm.cpp
+@@ -137,7 +137,7 @@ vm_t *VM_CreateLegacy( vmSlots_t vmSlot, intptr_t( *systemCalls )(intptr_t *) )
+ FS_FindPureDLL( vm->name );
+ vm->dllHandle = Sys_LoadLegacyGameDll( vm->name, &vm->legacy.main, VM_DllSyscall );
+
+- Com_Printf( "VM_CreateLegacy: %s"ARCH_STRING DLL_EXT, vm->name );
++ Com_Printf( "VM_CreateLegacy: %s" ARCH_STRING DLL_EXT, vm->name );
+ if ( vm->dllHandle ) {
+ if ( com_developer->integer )
+ Com_Printf( " succeeded [0x%" PRIxPTR "]\n", (uintptr_t)vm->dllHandle );
+@@ -176,7 +176,7 @@ vm_t *VM_Create( vmSlots_t vmSlot ) {
+ FS_FindPureDLL( vm->name );
+ vm->dllHandle = Sys_LoadGameDll( vm->name, &vm->GetModuleAPI );
+
+- Com_Printf( "VM_Create: %s"ARCH_STRING DLL_EXT, vm->name );
++ Com_Printf( "VM_Create: %s" ARCH_STRING DLL_EXT, vm->name );
+ if ( vm->dllHandle ) {
+ if ( com_developer->integer )
+ Com_Printf( " succeeded [0x%" PRIxPTR "+0x%" PRIxPTR "]\n", vm->dllHandle, (intptr_t)vm->GetModuleAPI - (intptr_t)vm->dllHandle );
+diff --git a/codemp/server/sv_ccmds.cpp b/codemp/server/sv_ccmds.cpp
+index 0a98759..bf6b501 100644
+--- a/codemp/server/sv_ccmds.cpp
++++ b/codemp/server/sv_ccmds.cpp
+@@ -1249,8 +1249,8 @@ static void SV_ConSay_f(void) {
+
+ Cmd_ArgsBuffer( text, sizeof(text) );
+
+- Com_Printf ("broadcast: chat \""SVSAY_PREFIX"%s\\n\"\n", SV_ExpandNewlines((char *)text) );
+- SV_SendServerCommand(NULL, "chat \""SVSAY_PREFIX"%s\"\n", text);
++ Com_Printf ("broadcast: chat \"" SVSAY_PREFIX "%s\\n\"\n", SV_ExpandNewlines((char *)text) );
++ SV_SendServerCommand(NULL, "chat \"" SVSAY_PREFIX "%s\"\n", text);
+ }
+
+ #define SVTELL_PREFIX "\x19[Server^7\x19]\x19: "
+@@ -1287,8 +1287,8 @@ static void SV_ConTell_f(void) {
+
+ Cmd_ArgsFromBuffer( 2, text, sizeof(text) );
+
+- Com_Printf ("tell: svtell to %s"S_COLOR_WHITE": %s\n", cl->name, SV_ExpandNewlines((char *)text) );
+- SV_SendServerCommand(cl, "chat \""SVTELL_PREFIX S_COLOR_MAGENTA"%s"S_COLOR_WHITE"\"\n", text);
++ Com_Printf ("tell: svtell to %s" S_COLOR_WHITE ": %s\n", cl->name, SV_ExpandNewlines((char *)text) );
++ SV_SendServerCommand(cl, "chat \"" SVTELL_PREFIX S_COLOR_MAGENTA "%s" S_COLOR_WHITE "\"\n", text);
+ }
+
+ const char *forceToggleNamePrints[NUM_FORCE_POWERS] = {
+diff --git a/codemp/server/sv_gameapi.cpp b/codemp/server/sv_gameapi.cpp
+index fbc6679..60190f5 100644
+--- a/codemp/server/sv_gameapi.cpp
++++ b/codemp/server/sv_gameapi.cpp
+@@ -2882,7 +2882,7 @@ void SV_BindGame( void ) {
+ static gameImport_t gi;
+ gameExport_t *ret;
+ GetGameAPI_t GetGameAPI;
+- char dllName[MAX_OSPATH] = "jampgame"ARCH_STRING DLL_EXT;
++ char dllName[MAX_OSPATH] = "jampgame" ARCH_STRING DLL_EXT;
+
+ memset( &gi, 0, sizeof( gi ) );
+
diff --git a/debian/patches/Use-NET_Sleep-or-Sys_Sleep-in-SP-to-avoid-busy-waiti.patch b/debian/patches/Use-NET_Sleep-or-Sys_Sleep-in-SP-to-avoid-busy-waiti.patch
index 77e688d..849b209 100644
--- a/debian/patches/Use-NET_Sleep-or-Sys_Sleep-in-SP-to-avoid-busy-waiti.patch
+++ b/debian/patches/Use-NET_Sleep-or-Sys_Sleep-in-SP-to-avoid-busy-waiti.patch
@@ -25,7 +25,7 @@ Bug: https://github.com/JACoders/OpenJK/issues/507
11 files changed, 235 insertions(+), 157 deletions(-)
diff --git a/code/qcommon/common.cpp b/code/qcommon/common.cpp
-index 9ef9953..8b21fca 100644
+index 6819199..b83dab5 100644
--- a/code/qcommon/common.cpp
+++ b/code/qcommon/common.cpp
@@ -48,7 +48,6 @@ cvar_t *com_speeds;
@@ -189,7 +189,7 @@ index 9ef9953..8b21fca 100644
msec = Com_ModifyMsec( msec, fractionMsec);
diff --git a/code/qcommon/qcommon.h b/code/qcommon/qcommon.h
-index 8cb982b..490f9a3 100644
+index cd81d01..32398b1 100644
--- a/code/qcommon/qcommon.h
+++ b/code/qcommon/qcommon.h
@@ -605,6 +605,7 @@ unsigned Com_BlockChecksum( const void *buffer, int length );
@@ -258,7 +258,7 @@ index c8abf18..37a012a 100644
- return false;
-}
diff --git a/codemp/qcommon/common.cpp b/codemp/qcommon/common.cpp
-index 7f48587..615340d 100644
+index 742ad17..4b41207 100644
--- a/codemp/qcommon/common.cpp
+++ b/codemp/qcommon/common.cpp
@@ -43,9 +43,7 @@ cvar_t *com_developer;
@@ -603,7 +603,7 @@ index 3105df1..ccfddf9 100644
/*
diff --git a/codemp/qcommon/qcommon.h b/codemp/qcommon/qcommon.h
-index 52a3368..899102e 100644
+index 32c499f..b3fcfb7 100644
--- a/codemp/qcommon/qcommon.h
+++ b/codemp/qcommon/qcommon.h
@@ -758,6 +758,7 @@ int Com_Filter(char *filter, char *name, int casesensitive);
@@ -733,7 +733,7 @@ index 2f03bd2..cc4aa86 100644
if ( eventHead > eventTail ) {
eventTail++;
diff --git a/shared/sys/sys_main.cpp b/shared/sys/sys_main.cpp
-index 61869b5..8fa2b2e 100644
+index f5a70e9..db78dd6 100644
--- a/shared/sys/sys_main.cpp
+++ b/shared/sys/sys_main.cpp
@@ -35,10 +35,11 @@ along with this program; if not, see <http://www.gnu.org/licenses/>.
@@ -766,7 +766,7 @@ index 61869b5..8fa2b2e 100644
static void NORETURN Sys_Exit( int ex ) {
diff --git a/shared/sys/sys_public.h b/shared/sys/sys_public.h
-index baf2c4c..8271a7f 100644
+index 866fda5..cfd5b7d 100644
--- a/shared/sys/sys_public.h
+++ b/shared/sys/sys_public.h
@@ -67,8 +67,7 @@ typedef enum {
diff --git a/debian/patches/codeJK2-replace-__cdecl-with-QDECL.patch b/debian/patches/codeJK2-replace-__cdecl-with-QDECL.patch
new file mode 100644
index 0000000..8ace593
--- /dev/null
+++ b/debian/patches/codeJK2-replace-__cdecl-with-QDECL.patch
@@ -0,0 +1,34 @@
+From: Simon McVittie <smcv at debian.org>
+Date: Mon, 27 Apr 2015 09:26:34 +0100
+Subject: codeJK2: replace __cdecl with QDECL
+
+On Windows, QDECL expands to __cdecl, which is presumably necessary.
+On other platforms, the __cdecl decoration does not exist, and
+QDECL correctly expands to nothing.
+
+Before commit 03235915, __cdecl expanded to nothing on non-Windows,
+due to inclusion of ibize_platform.h.
+
+Bug: https://github.com/JACoders/OpenJK/pull/658
+---
+ codeJK2/cgame/cg_weapons.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/codeJK2/cgame/cg_weapons.cpp b/codeJK2/cgame/cg_weapons.cpp
+index d8f5e42..a03fe02 100644
+--- a/codeJK2/cgame/cg_weapons.cpp
++++ b/codeJK2/cgame/cg_weapons.cpp
+@@ -215,11 +215,11 @@ void CG_RegisterWeapon( int weaponNum ) {
+ // give ourselves the functions if we can
+ if (weaponData[weaponNum].func)
+ {
+- weaponInfo->missileTrailFunc = (void (__cdecl *)(struct centity_s *,const struct weaponInfo_s *))weaponData[weaponNum].func;
++ weaponInfo->missileTrailFunc = (void (QDECL *)(struct centity_s *,const struct weaponInfo_s *))weaponData[weaponNum].func;
+ }
+ if (weaponData[weaponNum].altfunc)
+ {
+- weaponInfo->alt_missileTrailFunc = (void (__cdecl *)(struct centity_s *,const struct weaponInfo_s *))weaponData[weaponNum].altfunc;
++ weaponInfo->alt_missileTrailFunc = (void (QDECL *)(struct centity_s *,const struct weaponInfo_s *))weaponData[weaponNum].altfunc;
+ }
+
+ switch ( weaponNum ) //extra client only stuff
diff --git a/debian/patches/series b/debian/patches/series
index dc3734f..9b35041 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,8 @@ g_utils-stub-out-debug-code-to-write-to-a-misc-Windo.patch
Don-t-link-renderer-and-clients-to-a-bunch-of-unnece.patch
Use-NET_Sleep-or-Sys_Sleep-in-SP-to-avoid-busy-waiti.patch
Fix-use-of-uninitialized-variable.patch
+Select-C-11-mode-when-compiling-with-g.patch
+codeJK2-replace-__cdecl-with-QDECL.patch
+Use-C-11-compliant-string-concatenation.patch
+SP-JK2-g_savegame-silence-compiler-warning.patch
+JK2-icarus-tokenizer-include-cstring-for-strcmp-memc.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/openjk.git
More information about the Pkg-games-commits
mailing list