]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Comply with ISO C11. Engine will now compile with -pedantic, w/o extra warnings
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 30 Jun 2020 05:10:48 +0000 (05:10 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 30 Jun 2020 05:10:48 +0000 (05:10 +0000)
But don't actually use -std=c11 because computed gotos is a gcc
extension that makes the QCVM 30 percent faster in all situations.
c11 obviously disables gcc extensions. But this is a nice thing to
achieve as far as portability is concerned.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12756 d7cf8633-e32d-0410-b094-e92efae38249

16 files changed:
common.h
csprogs.c
gl_backend.c
makefile.inc
model_shared.c
mvm_cmds.c
progsvm.h
prvm_cmds.c
prvm_edict.c
prvm_exec.c
render.h
svvm_cmds.c
sys_linux.c
sys_sdl.c
vid_sdl.c
zone.c

index e816608fb4db3317cab228e636b9972b823feaf2..64dba29015cd067415d6d9cc43d0551bb97a4453 100644 (file)
--- a/common.h
+++ b/common.h
@@ -26,6 +26,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #ifdef WIN32
 # define strcasecmp _stricmp
 # define strncasecmp _strnicmp
+#else
+#include "strings.h"
 #endif
 
 // Create our own define for Mac OS X
@@ -34,7 +36,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #endif
 
 #ifdef SUNOS
-#include <sys/file.h>          ///< Needed for FNDELAY
+#include <sys/file.h>          ///< Needed for O_NDELAY
 #endif
 
 //============================================================================
index 665d4887269c1637ae4f5a7b9ee692138ced6328..fa1673b4c375254ab44b185e838041e289ad4505 100644 (file)
--- a/csprogs.c
+++ b/csprogs.c
@@ -1015,7 +1015,7 @@ void CL_VM_Init (void)
                }
                else
                {
-                       Con_DPrintf("Not using buffered \"%s\" (buffered: %p, %d)\n", csprogsfn, cls.caughtcsprogsdata, (int) cls.caughtcsprogsdatasize);
+                       Con_DPrintf("Not using buffered \"%s\" (buffered: %p, %d)\n", csprogsfn, (void *)cls.caughtcsprogsdata, (int) cls.caughtcsprogsdatasize);
                        csprogsdata = FS_LoadFile(csprogsfn, tempmempool, true, &csprogsdatasize);
                }
        }
index b16916a75ebad77541af5abcee776e24ba239ec9..5f53208d59908d86f88832c1ed30acf34e39c02d 100644 (file)
@@ -1907,7 +1907,7 @@ void R_Mesh_VertexPointer(int components, int gltype, size_t stride, const void
                {
                        int bufferobject = vertexbuffer ? vertexbuffer->bufferobject : 0;
                        if (!bufferobject && gl_paranoid.integer)
-                               Con_DPrintf("Warning: no bufferobject in R_Mesh_VertexPointer(%i, %i, %i, %p, %p, %08x)", components, gltype, (int)stride, pointer, vertexbuffer, (unsigned int)bufferoffset);
+                               Con_DPrintf("Warning: no bufferobject in R_Mesh_VertexPointer(%i, %i, %i, %p, %p, %08x)", components, gltype, (int)stride, pointer, (void *)vertexbuffer, (unsigned int)bufferoffset);
                        gl_state.pointer_vertex_components = components;
                        gl_state.pointer_vertex_gltype = gltype;
                        gl_state.pointer_vertex_stride = stride;
index ce15fefaeaf804a8b0a325e8de4b43f56c876f52..2d83af48472faf6a74194b4f700d105b480da353 100644 (file)
@@ -173,6 +173,7 @@ OBJ_SDL= builddate.c sys_sdl.o vid_sdl.o thread_sdl.o $(OBJ_MENU) $(OBJ_SND_COMM
 
 # Compilation
 CFLAGS_COMMON=$(CFLAGS_MAKEDEP) $(CFLAGS_PRELOAD) $(CFLAGS_FS) $(CFLAGS_WARNINGS) $(CFLAGS_LIBZ) $(CFLAGS_LIBJPEG) $(CFLAGS_SND_XMP) $(CFLAGS_NET) $(CFLAGS_SDL) -D_FILE_OFFSET_BITS=64 -D__KERNEL_STRICT_NAMES -I../../../
+# CFLAGS_STANDARD=-D_POSIX_C_SOURCE=200112L -std=c11 -pedantic
 CFLAGS_CLIENT=-DCONFIG_MENU $(CFLAGS_VIDEO_CAPTURE)
 CFLAGS_SERVER=
 CFLAGS_DEBUG=-ggdb
index 077197aa23b0ab09091e4957add9d7db5c072425..f4f74cd931d1f9c96af0fe7e02cedcbc5280051b 100644 (file)
@@ -748,7 +748,7 @@ qboolean Mod_ValidateElements(int *element3i, unsigned short *element3s, int num
        }
        if (invalidintcount || invalidshortcount || invalidmismatchcount)
        {
-               Con_Printf("Mod_ValidateElements(%i, %i, %i, %p, %p) called at %s:%d", numelements, first, last, element3i, element3s, filename, fileline);
+               Con_Printf("Mod_ValidateElements(%i, %i, %i, %p, %p) called at %s:%d", numelements, first, last, (void *)element3i, (void *)element3s, filename, fileline);
                Con_Printf(", %i elements are invalid in element3i (example: element3i[%i] == %i)", invalidintcount, invalidintexample, element3i ? element3i[invalidintexample] : 0);
                Con_Printf(", %i elements are invalid in element3s (example: element3s[%i] == %i)", invalidshortcount, invalidshortexample, element3s ? element3s[invalidshortexample] : 0);
                Con_Printf(", %i elements mismatch between element3i and element3s (example: element3s[%i] is %i and element3i[%i] is %i)", invalidmismatchcount, invalidmismatchexample, element3s ? element3s[invalidmismatchexample] : 0, invalidmismatchexample, element3i ? element3i[invalidmismatchexample] : 0);
index df6497fa2437ea5c85a5da14632db698d0f23d5f..c9da3166fd378e4e556082c99f2b1c8e587db965 100644 (file)
 //============================================================================
 // Menu
 
-const char *vm_m_extensions =
-"BX_WAL_SUPPORT "
-"DP_CINEMATIC_DPV "
-"DP_COVERAGE "
-"DP_CRYPTO "
-"DP_CSQC_BINDMAPS "
-"DP_GFX_FONTS "
-"DP_GFX_FONTS_FREETYPE "
-"DP_UTF8 "
-"DP_FONT_VARIABLEWIDTH "
-"DP_MENU_EXTRESPONSEPACKET "
-"DP_QC_ASINACOSATANATAN2TAN "
-"DP_QC_AUTOCVARS "
-"DP_QC_CMD "
-"DP_QC_CRC16 "
-"DP_QC_CVAR_TYPE "
-"DP_QC_CVAR_DESCRIPTION "
-"DP_QC_DIGEST "
-"DP_QC_DIGEST_SHA256 "
-"DP_QC_FINDCHAIN_TOFIELD "
-"DP_QC_I18N "
-"DP_QC_LOG "
-"DP_QC_RENDER_SCENE "
-"DP_QC_SPRINTF "
-"DP_QC_STRFTIME "
-"DP_QC_STRINGBUFFERS "
-"DP_QC_STRINGBUFFERS_CVARLIST "
-"DP_QC_STRINGBUFFERS_EXT_WIP "
-"DP_QC_STRINGCOLORFUNCTIONS "
-"DP_QC_STRING_CASE_FUNCTIONS "
-"DP_QC_STRREPLACE "
-"DP_QC_TOKENIZEBYSEPARATOR "
-"DP_QC_TOKENIZE_CONSOLE "
-"DP_QC_UNLIMITEDTEMPSTRINGS "
-"DP_QC_URI_ESCAPE "
-"DP_QC_URI_GET "
-"DP_QC_URI_POST "
-"DP_QC_WHICHPACK "
-"FTE_STRINGS "
-;
+const char *vm_m_extensions[] = {
+"BX_WAL_SUPPORT",
+"DP_CINEMATIC_DPV",
+"DP_COVERAGE",
+"DP_CRYPTO",
+"DP_CSQC_BINDMAPS",
+"DP_GFX_FONTS",
+"DP_GFX_FONTS_FREETYPE",
+"DP_UTF8",
+"DP_FONT_VARIABLEWIDTH",
+"DP_MENU_EXTRESPONSEPACKET",
+"DP_QC_ASINACOSATANATAN2TAN",
+"DP_QC_AUTOCVARS",
+"DP_QC_CMD",
+"DP_QC_CRC16",
+"DP_QC_CVAR_TYPE",
+"DP_QC_CVAR_DESCRIPTION",
+"DP_QC_DIGEST",
+"DP_QC_DIGEST_SHA256",
+"DP_QC_FINDCHAIN_TOFIELD",
+"DP_QC_I18N",
+"DP_QC_LOG",
+"DP_QC_RENDER_SCENE",
+"DP_QC_SPRINTF",
+"DP_QC_STRFTIME",
+"DP_QC_STRINGBUFFERS",
+"DP_QC_STRINGBUFFERS_CVARLIST",
+"DP_QC_STRINGBUFFERS_EXT_WIP",
+"DP_QC_STRINGCOLORFUNCTIONS",
+"DP_QC_STRING_CASE_FUNCTIONS",
+"DP_QC_STRREPLACE",
+"DP_QC_TOKENIZEBYSEPARATOR",
+"DP_QC_TOKENIZE_CONSOLE",
+"DP_QC_UNLIMITEDTEMPSTRINGS",
+"DP_QC_URI_ESCAPE",
+"DP_QC_URI_GET",
+"DP_QC_URI_POST",
+"DP_QC_WHICHPACK",
+"FTE_STRINGS",
+NULL
+};
 
 /*
 =========
index 2651749497f30f61162a8206a03884698bd87fa7..e9999ca4f83b61e11333e035d389ca463401012a 100644 (file)
--- a/progsvm.h
+++ b/progsvm.h
@@ -685,7 +685,7 @@ typedef struct prvm_prog_s
        // flag - used to store general flags like PRVM_GE_SELF, etc.
        int                             flag;
 
-       const char                      *extensionstring; // [INIT]
+       const char                      **extensionstring; // [INIT]
 
        qboolean                        loadintoworld; // [INIT]
 
@@ -763,8 +763,8 @@ extern const int vm_sv_numbuiltins;
 extern const int vm_cl_numbuiltins;
 extern const int vm_m_numbuiltins;
 
-extern const char * vm_sv_extensions; // client also uses this
-extern const char * vm_m_extensions;
+extern const char *vm_sv_extensions[]; // client also uses this
+extern const char *vm_m_extensions[];
 
 void SVVM_init_cmd(prvm_prog_t *prog);
 void SVVM_reset_cmd(prvm_prog_t *prog);
index 65fc3a181d0e2b0fc121c566637b856897be8ccc..6833080ec04a9f33c1508e4bae5be7a16328d079 100644 (file)
@@ -265,20 +265,11 @@ checkextension(extensionname)
 // kind of helper function
 static qboolean checkextension(prvm_prog_t *prog, const char *name)
 {
-       int len;
-       const char *e, *start;
-       len = (int)strlen(name);
+       const char **e;
 
        for (e = prog->extensionstring;*e;e++)
        {
-               while (*e == ' ')
-                       e++;
-               if (!*e)
-                       break;
-               start = e;
-               while (*e && *e != ' ')
-                       e++;
-               if ((e - start) == len && !strncasecmp(start, name, len))
+               if(!strcasecmp(*e, name))
                {
 #ifdef USEODE
                        // special sheck for ODE
index 83d194d3453915d614144031e37009e2a19b73e6..dc639e3ca0040880e890d18ebfb35cd010a864dd 100644 (file)
@@ -3128,7 +3128,7 @@ int PRVM_SetEngineString(prvm_prog_t *prog, const char *s)
                        return PRVM_KNOWNSTRINGBASE + i;
        // new unknown engine string
        if (developer_insane.integer)
-               Con_DPrintf("new engine string %p = \"%s\"\n", s, s);
+               Con_DPrintf("new engine string %p = \"%s\"\n", (void *)s, s);
        for (i = prog->firstfreeknownstring;i < prog->numknownstrings;i++)
                if (!prog->knownstrings[i])
                        break;
index e3dc1902c0de2db622dd782f6a2ffefb90137348..b6766757d5a38dfb358b90564a525c5598f2b30e 100644 (file)
@@ -716,7 +716,7 @@ static void PRVM_StatementCoverageEvent(prvm_prog_t *prog, mfunction_t *func, in
        Con_Printf("prvm_coverage: %s just executed a statement at %s for the first time. Coverage: %.2f%%.\n", prog->name, PRVM_WhereAmI(vabuf, sizeof(vabuf), prog, func, statement), prog->statements_covered * 100.0 / prog->numstatements);
 }
 
-#ifdef __GNUC__
+#if defined (__GNUC__) && (_GNU_SOURCE)
 #define HAVE_COMPUTED_GOTOS 1
 #endif
 
index 2367fbfe336072ed6d0baf272893fd7080ec8f50..c8d63be83b7c17b9ec5ab2203c3c50f649425835 100644 (file)
--- a/render.h
+++ b/render.h
@@ -69,43 +69,39 @@ typedef enum shadermode_e
 }
 shadermode_t;
 
-typedef enum shaderpermutation_e
-{
-       SHADERPERMUTATION_DIFFUSE = 1<<0, ///< (lightsource) whether to use directional shading
-       SHADERPERMUTATION_VERTEXTEXTUREBLEND = 1<<1, ///< indicates this is a two-layer material blend based on vertex alpha (q3bsp)
-       SHADERPERMUTATION_VIEWTINT = 1<<2, ///< view tint (postprocessing only), use vertex colors (generic only)
-       SHADERPERMUTATION_COLORMAPPING = 1<<3, ///< indicates this is a colormapped skin
-       SHADERPERMUTATION_SATURATION = 1<<4, ///< saturation (postprocessing only)
-       SHADERPERMUTATION_FOGINSIDE = 1<<5, ///< tint the color by fog color or black if using additive blend mode
-       SHADERPERMUTATION_FOGOUTSIDE = 1<<6, ///< tint the color by fog color or black if using additive blend mode
-       SHADERPERMUTATION_FOGHEIGHTTEXTURE = 1<<7, ///< fog color and density determined by texture mapped on vertical axis
-       SHADERPERMUTATION_FOGALPHAHACK = 1<<8, ///< fog color and density determined by texture mapped on vertical axis
-       SHADERPERMUTATION_GAMMARAMPS = 1<<9, ///< gamma (postprocessing only)
-       SHADERPERMUTATION_CUBEFILTER = 1<<10, ///< (lightsource) use cubemap light filter
-       SHADERPERMUTATION_GLOW = 1<<11, ///< (lightmap) blend in an additive glow texture
-       SHADERPERMUTATION_BLOOM = 1<<12, ///< bloom (postprocessing only)
-       SHADERPERMUTATION_SPECULAR = 1<<13, ///< (lightsource or deluxemapping) render specular effects
-       SHADERPERMUTATION_POSTPROCESSING = 1<<14, ///< user defined postprocessing (postprocessing only)
-       SHADERPERMUTATION_REFLECTION = 1<<15, ///< normalmap-perturbed reflection of the scene infront of the surface, preformed as an overlay on the surface
-       SHADERPERMUTATION_OFFSETMAPPING = 1<<16, ///< adjust texcoords to roughly simulate a displacement mapped surface
-       SHADERPERMUTATION_OFFSETMAPPING_RELIEFMAPPING = 1<<17, ///< adjust texcoords to accurately simulate a displacement mapped surface (requires OFFSETMAPPING to also be set!)
-       SHADERPERMUTATION_SHADOWMAP2D = 1<<18, ///< (lightsource) use shadowmap texture as light filter
-       SHADERPERMUTATION_SHADOWMAPVSDCT = 1<<19, ///< (lightsource) use virtual shadow depth cube texture for shadowmap indexing
-       SHADERPERMUTATION_SHADOWMAPORTHO = 1<<20, ///< (lightsource) use orthographic shadowmap projection
-       SHADERPERMUTATION_DEFERREDLIGHTMAP = 1<<21, ///< (lightmap) read Texture_ScreenDiffuse/Specular textures and add them on top of lightmapping
-       SHADERPERMUTATION_ALPHAKILL = 1<<22, ///< (deferredgeometry) discard pixel if diffuse texture alpha below 0.5, (generic) apply global alpha
-       SHADERPERMUTATION_REFLECTCUBE = 1<<23, ///< fake reflections using global cubemap (not HDRI light probe)
-       SHADERPERMUTATION_NORMALMAPSCROLLBLEND = 1<<24, ///< (water) counter-direction normalmaps scrolling
-       SHADERPERMUTATION_BOUNCEGRID = 1<<25, ///< (lightmap) use Texture_BounceGrid as an additional source of ambient light
-       SHADERPERMUTATION_BOUNCEGRIDDIRECTIONAL = 1<<26, ///< (lightmap) use 16-component pixels in bouncegrid texture for directional lighting rather than standard 4-component
-       SHADERPERMUTATION_TRIPPY = 1<<27, ///< use trippy vertex shader effect
-       SHADERPERMUTATION_DEPTHRGB = 1<<28, ///< read/write depth values in RGB color coded format for older hardware without depth samplers
-       SHADERPERMUTATION_ALPHAGEN_VERTEX = 1<<29, ///< alphaGen vertex
-       SHADERPERMUTATION_SKELETAL = 1<<30, ///< (skeletal models) use skeletal matrices to deform vertices (gpu-skinning)
-       SHADERPERMUTATION_OCCLUDE = 1<<31, ///< use occlusion buffer for corona
-       SHADERPERMUTATION_COUNT = 32 ///< size of shaderpermutationinfo array
-}
-shaderpermutation_t;
+#define SHADERPERMUTATION_DIFFUSE (1<<0) ///< (lightsource) whether to use directional shading
+#define SHADERPERMUTATION_VERTEXTEXTUREBLEND (1<<1) ///< indicates this is a two-layer material blend based on vertex alpha (q3bsp)
+#define        SHADERPERMUTATION_VIEWTINT (1<<2) ///< view tint (postprocessing only), use vertex colors (generic only)
+#define        SHADERPERMUTATION_COLORMAPPING (1<<3) ///< indicates this is a colormapped skin
+#define        SHADERPERMUTATION_SATURATION (1<<4) ///< saturation (postprocessing only)
+#define        SHADERPERMUTATION_FOGINSIDE (1<<5) ///< tint the color by fog color or black if using additive blend mode
+#define        SHADERPERMUTATION_FOGOUTSIDE (1<<6) ///< tint the color by fog color or black if using additive blend mode
+#define        SHADERPERMUTATION_FOGHEIGHTTEXTURE (1<<7) ///< fog color and density determined by texture mapped on vertical axis
+#define        SHADERPERMUTATION_FOGALPHAHACK (1<<8) ///< fog color and density determined by texture mapped on vertical axis
+#define        SHADERPERMUTATION_GAMMARAMPS (1<<9) ///< gamma (postprocessing only)
+#define        SHADERPERMUTATION_CUBEFILTER (1<<10) ///< (lightsource) use cubemap light filter
+#define        SHADERPERMUTATION_GLOW (1<<11) ///< (lightmap) blend in an additive glow texture
+#define        SHADERPERMUTATION_BLOOM (1<<12) ///< bloom (postprocessing only)
+#define        SHADERPERMUTATION_SPECULAR (1<<13) ///< (lightsource or deluxemapping) render specular effects
+#define        SHADERPERMUTATION_POSTPROCESSING (1<<14) ///< user defined postprocessing (postprocessing only)
+#define        SHADERPERMUTATION_REFLECTION (1<<15) ///< normalmap-perturbed reflection of the scene infront of the surface, preformed as an overlay on the surface
+#define        SHADERPERMUTATION_OFFSETMAPPING (1<<16) ///< adjust texcoords to roughly simulate a displacement mapped surface
+#define        SHADERPERMUTATION_OFFSETMAPPING_RELIEFMAPPING (1<<17) ///< adjust texcoords to accurately simulate a displacement mapped surface (requires OFFSETMAPPING to also be set!)
+#define        SHADERPERMUTATION_SHADOWMAP2D (1<<18) ///< (lightsource) use shadowmap texture as light filter
+#define        SHADERPERMUTATION_SHADOWMAPVSDCT (1<<19) ///< (lightsource) use virtual shadow depth cube texture for shadowmap indexing
+#define        SHADERPERMUTATION_SHADOWMAPORTHO (1<<20) ///< (lightsource) use orthographic shadowmap projection
+#define        SHADERPERMUTATION_DEFERREDLIGHTMAP (1<<21) ///< (lightmap) read Texture_ScreenDiffuse/Specular textures and add them on top of lightmapping
+#define        SHADERPERMUTATION_ALPHAKILL (1<<22) ///< (deferredgeometry) discard pixel if diffuse texture alpha below 0.5, (generic) apply global alpha
+#define        SHADERPERMUTATION_REFLECTCUBE (1<<23) ///< fake reflections using global cubemap (not HDRI light probe)
+#define        SHADERPERMUTATION_NORMALMAPSCROLLBLEND (1<<24) ///< (water) counter-direction normalmaps scrolling
+#define        SHADERPERMUTATION_BOUNCEGRID (1<<25) ///< (lightmap) use Texture_BounceGrid as an additional source of ambient light
+#define        SHADERPERMUTATION_BOUNCEGRIDDIRECTIONAL (1<<26) ///< (lightmap) use 16-component pixels in bouncegrid texture for directional lighting rather than standard 4-component
+#define SHADERPERMUTATION_TRIPPY (1<<27) ///< use trippy vertex shader effect
+#define        SHADERPERMUTATION_DEPTHRGB (1<<28) ///< read/write depth values in RGB color coded format for older hardware without depth samplers
+#define        SHADERPERMUTATION_ALPHAGEN_VERTEX (1<<29) ///< alphaGen vertex
+#define        SHADERPERMUTATION_SKELETAL (1<<30) ///< (skeletal models) use skeletal matrices to deform vertices (gpu-skinning)
+#define        SHADERPERMUTATION_OCCLUDE (1<<31) ///< use occlusion buffer for corona
+#define        SHADERPERMUTATION_COUNT 32 ///< size of shaderpermutationinfo array
 
 // 1.0f / N table
 extern float ixtable[4096];
index 12ef69dab455c345729fb55c0bcb73a7f5e81adb..4d46fd9dba8885f223d6147ebcfb34eb172d2905 100644 (file)
 
 
 
-const char *vm_sv_extensions =
-"BX_WAL_SUPPORT "
-"DP_BUTTONCHAT "
-"DP_BUTTONUSE "
-"DP_CL_LOADSKY "
-"DP_CON_ALIASPARAMETERS "
-"DP_CON_BESTWEAPON "
-"DP_CON_EXPANDCVAR "
-"DP_CON_SET "
-"DP_CON_SETA "
-"DP_CON_STARTMAP "
-"DP_COVERAGE "
-"DP_CRYPTO "
-"DP_CSQC_BINDMAPS "
-"DP_CSQC_ENTITYWORLDOBJECT "
-"DP_CSQC_ENTITYMODELLIGHT "
-"DP_CSQC_ENTITYTRANSPARENTSORTING_OFFSET "
-"DP_CSQC_MAINVIEW "
-"DP_CSQC_MINFPS_QUALITY "
-"DP_CSQC_MULTIFRAME_INTERPOLATION "
-"DP_CSQC_BOXPARTICLES "
-"DP_CSQC_SPAWNPARTICLE "
-"DP_CSQC_QUERYRENDERENTITY "
-"DP_CSQC_ROTATEMOVES "
-"DP_CSQC_SETPAUSE "
-"DP_CSQC_V_CALCREFDEF_WIP1 "
-"DP_CSQC_V_CALCREFDEF_WIP2 "
-"DP_EF_ADDITIVE "
-"DP_EF_BLUE "
-"DP_EF_DOUBLESIDED "
-"DP_EF_DYNAMICMODELLIGHT "
-"DP_EF_FLAME "
-"DP_EF_FULLBRIGHT "
-"DP_EF_NODEPTHTEST "
-"DP_EF_NODRAW "
-"DP_EF_NOGUNBOB "
-"DP_EF_NOSELFSHADOW "
-"DP_EF_NOSHADOW "
-"DP_EF_RED "
-"DP_EF_RESTARTANIM_BIT "
-"DP_EF_STARDUST "
-"DP_EF_TELEPORT_BIT "
-"DP_ENT_ALPHA "
-"DP_ENT_COLORMOD "
-"DP_ENT_CUSTOMCOLORMAP "
-"DP_ENT_EXTERIORMODELTOCLIENT "
-"DP_ENT_GLOW "
-"DP_ENT_GLOWMOD "
-"DP_ENT_LOWPRECISION "
-"DP_ENT_SCALE "
-"DP_ENT_TRAILEFFECTNUM "
-"DP_ENT_VIEWMODEL "
-"DP_GFX_EXTERNALTEXTURES "
-"DP_GFX_EXTERNALTEXTURES_PERMAP "
-"DP_GFX_FOG "
-"DP_GFX_MODEL_INTERPOLATION "
-"DP_GFX_QUAKE3MODELTAGS "
-"DP_GFX_SKINFILES "
-"DP_GFX_SKYBOX "
-"DP_GFX_FONTS "
-"DP_GFX_FONTS_FREETYPE "
-"DP_UTF8 "
-"DP_FONT_VARIABLEWIDTH "
-"DP_HALFLIFE_MAP "
-"DP_HALFLIFE_MAP_CVAR "
-"DP_HALFLIFE_SPRITE "
-"DP_INPUTBUTTONS "
-"DP_LIGHTSTYLE_STATICVALUE "
-"DP_LITSPRITES "
-"DP_LITSUPPORT "
-"DP_MONSTERWALK "
-"DP_MOVETYPEBOUNCEMISSILE "
-"DP_MOVETYPEFLYWORLDONLY "
-"DP_MOVETYPEFOLLOW "
-"DP_NULL_MODEL "
-"DP_QC_ASINACOSATANATAN2TAN "
-"DP_QC_AUTOCVARS "
-"DP_QC_CHANGEPITCH "
-"DP_QC_CMD "
-"DP_QC_COPYENTITY "
-"DP_QC_CRC16 "
-"DP_QC_CVAR_DEFSTRING "
-"DP_QC_CVAR_DESCRIPTION "
-"DP_QC_CVAR_STRING "
-"DP_QC_CVAR_TYPE "
-"DP_QC_DIGEST "
-"DP_QC_DIGEST_SHA256 "
-"DP_QC_EDICT_NUM "
-"DP_QC_ENTITYDATA "
-"DP_QC_ENTITYSTRING "
-"DP_QC_ETOS "
-"DP_QC_EXTRESPONSEPACKET "
-"DP_QC_FINDCHAIN "
-"DP_QC_FINDCHAINFLAGS "
-"DP_QC_FINDCHAINFLOAT "
-"DP_QC_FINDCHAIN_TOFIELD "
-"DP_QC_FINDFLAGS "
-"DP_QC_FINDFLOAT "
-"DP_QC_FS_SEARCH "
-"DP_QC_GETLIGHT "
-"DP_QC_GETSURFACE "
-"DP_QC_GETSURFACETRIANGLE "
-"DP_QC_GETSURFACEPOINTATTRIBUTE "
-"DP_QC_GETTAGINFO "
-"DP_QC_GETTAGINFO_BONEPROPERTIES "
-"DP_QC_GETTIME "
-"DP_QC_GETTIME_CDTRACK "
-"DP_QC_I18N "
-"DP_QC_LOG "
-"DP_QC_MINMAXBOUND "
-"DP_QC_MULTIPLETEMPSTRINGS "
-"DP_QC_NUM_FOR_EDICT "
-"DP_QC_RANDOMVEC "
-"DP_QC_SINCOSSQRTPOW "
-"DP_QC_SPRINTF "
-"DP_QC_STRFTIME "
-"DP_QC_STRINGBUFFERS "
-"DP_QC_STRINGBUFFERS_CVARLIST "
-"DP_QC_STRINGBUFFERS_EXT_WIP "
-"DP_QC_STRINGCOLORFUNCTIONS "
-"DP_QC_STRING_CASE_FUNCTIONS "
-"DP_QC_STRREPLACE "
-"DP_QC_TOKENIZEBYSEPARATOR "
-"DP_QC_TOKENIZE_CONSOLE "
-"DP_QC_TRACEBOX "
-"DP_QC_TRACETOSS "
-"DP_QC_TRACE_MOVETYPE_HITMODEL "
-"DP_QC_TRACE_MOVETYPE_WORLDONLY "
-"DP_QC_UNLIMITEDTEMPSTRINGS "
-"DP_QC_URI_ESCAPE "
-"DP_QC_URI_GET "
-"DP_QC_URI_POST "
-"DP_QC_VECTOANGLES_WITH_ROLL "
-"DP_QC_VECTORVECTORS "
-"DP_QC_WHICHPACK "
-"DP_QUAKE2_MODEL "
-"DP_QUAKE2_SPRITE "
-"DP_QUAKE3_MAP "
-"DP_QUAKE3_MODEL "
-"DP_REGISTERCVAR "
-"DP_SKELETONOBJECTS "
-"DP_SND_DIRECTIONLESSATTNNONE "
-"DP_SND_FAKETRACKS "
-"DP_SND_SOUND7_WIP1 "
-"DP_SND_SOUND7_WIP2 "
-"DP_SND_OGGVORBIS "
-"DP_SND_SETPARAMS "
-"DP_SND_STEREOWAV "
-"DP_SND_GETSOUNDTIME "
-"DP_VIDEO_DPV "
-"DP_VIDEO_SUBTITLES "
-"DP_SOLIDCORPSE "
-"DP_SPRITE32 "
-"DP_SV_BOTCLIENT "
-"DP_SV_BOUNCEFACTOR "
-"DP_SV_CLIENTCAMERA "
-"DP_SV_CLIENTCOLORS "
-"DP_SV_CLIENTNAME "
-"DP_SV_CMD "
-"DP_SV_CUSTOMIZEENTITYFORCLIENT "
-"DP_SV_DISABLECLIENTPREDICTION "
-"DP_SV_DISCARDABLEDEMO "
-"DP_SV_DRAWONLYTOCLIENT "
-"DP_SV_DROPCLIENT "
-"DP_SV_EFFECT "
-"DP_SV_ENTITYCONTENTSTRANSITION "
-"DP_SV_MODELFLAGS_AS_EFFECTS "
-"DP_SV_MOVETYPESTEP_LANDEVENT "
-"DP_SV_NETADDRESS "
-"DP_SV_NODRAWTOCLIENT "
-"DP_SV_ONENTITYNOSPAWNFUNCTION "
-"DP_SV_ONENTITYPREPOSTSPAWNFUNCTION "
-"DP_SV_PING "
-"DP_SV_PING_PACKETLOSS "
-"DP_SV_PLAYERPHYSICS "
-"DP_PHYSICS_ODE "
-"DP_SV_POINTPARTICLES "
-"DP_SV_POINTSOUND "
-"DP_SV_PRECACHEANYTIME "
-"DP_SV_PRINT "
-"DP_SV_PUNCHVECTOR "
-"DP_SV_QCSTATUS "
-"DP_SV_ROTATINGBMODEL "
-"DP_SV_SETCOLOR "
-"DP_SV_SHUTDOWN "
-"DP_SV_SLOWMO "
-"DP_SV_SPAWNFUNC_PREFIX "
-"DP_SV_WRITEPICTURE "
-"DP_SV_WRITEUNTERMINATEDSTRING "
-"DP_TE_BLOOD "
-"DP_TE_BLOODSHOWER "
-"DP_TE_CUSTOMFLASH "
-"DP_TE_EXPLOSIONRGB "
-"DP_TE_FLAMEJET "
-"DP_TE_PARTICLECUBE "
-"DP_TE_PARTICLERAIN "
-"DP_TE_PARTICLESNOW "
-"DP_TE_PLASMABURN "
-"DP_TE_QUADEFFECTS1 "
-"DP_TE_SMALLFLASH "
-"DP_TE_SPARK "
-"DP_TE_STANDARDEFFECTBUILTINS "
-"DP_TRACE_HITCONTENTSMASK_SURFACEINFO "
-"DP_USERMOVETYPES "
-"DP_VIEWZOOM "
-"EXT_BITSHIFT "
-"FRIK_FILE "
-"FTE_CSQC_SKELETONOBJECTS "
-"FTE_QC_CHECKPVS "
-"FTE_STRINGS "
-"KRIMZON_SV_PARSECLIENTCOMMAND "
-"NEH_CMD_PLAY2 "
-"NEH_RESTOREGAME "
-"NEXUIZ_PLAYERMODEL "
-"NXQ_GFX_LETTERBOX "
-"PRYDON_CLIENTCURSOR "
-"TENEBRAE_GFX_DLIGHTS "
-"TW_SV_STEPCONTROL "
-"ZQ_PAUSE "
-"DP_RM_CLIPGROUP "
-//"EXT_CSQC " // not ready yet
-;
+const char *vm_sv_extensions[] = {
+"BX_WAL_SUPPORT",
+"DP_BUTTONCHAT",
+"DP_BUTTONUSE",
+"DP_CL_LOADSKY",
+"DP_CON_ALIASPARAMETERS",
+"DP_CON_BESTWEAPON",
+"DP_CON_EXPANDCVAR",
+"DP_CON_SET",
+"DP_CON_SETA",
+"DP_CON_STARTMAP",
+"DP_COVERAGE",
+"DP_CRYPTO",
+"DP_CSQC_BINDMAPS",
+"DP_CSQC_ENTITYWORLDOBJECT",
+"DP_CSQC_ENTITYMODELLIGHT",
+"DP_CSQC_ENTITYTRANSPARENTSORTING_OFFSET",
+"DP_CSQC_MAINVIEW",
+"DP_CSQC_MINFPS_QUALITY",
+"DP_CSQC_MULTIFRAME_INTERPOLATION",
+"DP_CSQC_BOXPARTICLES",
+"DP_CSQC_SPAWNPARTICLE",
+"DP_CSQC_QUERYRENDERENTITY",
+"DP_CSQC_ROTATEMOVES",
+"DP_CSQC_SETPAUSE",
+"DP_CSQC_V_CALCREFDEF_WIP1",
+"DP_CSQC_V_CALCREFDEF_WIP2",
+"DP_EF_ADDITIVE",
+"DP_EF_BLUE",
+"DP_EF_DOUBLESIDED",
+"DP_EF_DYNAMICMODELLIGHT",
+"DP_EF_FLAME",
+"DP_EF_FULLBRIGHT",
+"DP_EF_NODEPTHTEST",
+"DP_EF_NODRAW",
+"DP_EF_NOGUNBOB",
+"DP_EF_NOSELFSHADOW",
+"DP_EF_NOSHADOW",
+"DP_EF_RED",
+"DP_EF_RESTARTANIM_BIT",
+"DP_EF_STARDUST",
+"DP_EF_TELEPORT_BIT",
+"DP_ENT_ALPHA",
+"DP_ENT_COLORMOD",
+"DP_ENT_CUSTOMCOLORMAP",
+"DP_ENT_EXTERIORMODELTOCLIENT",
+"DP_ENT_GLOW",
+"DP_ENT_GLOWMOD",
+"DP_ENT_LOWPRECISION",
+"DP_ENT_SCALE",
+"DP_ENT_TRAILEFFECTNUM",
+"DP_ENT_VIEWMODEL",
+"DP_GFX_EXTERNALTEXTURES",
+"DP_GFX_EXTERNALTEXTURES_PERMAP",
+"DP_GFX_FOG",
+"DP_GFX_MODEL_INTERPOLATION",
+"DP_GFX_QUAKE3MODELTAGS",
+"DP_GFX_SKINFILES",
+"DP_GFX_SKYBOX",
+"DP_GFX_FONTS",
+"DP_GFX_FONTS_FREETYPE",
+"DP_UTF8",
+"DP_FONT_VARIABLEWIDTH",
+"DP_HALFLIFE_MAP",
+"DP_HALFLIFE_MAP_CVAR",
+"DP_HALFLIFE_SPRITE",
+"DP_INPUTBUTTONS",
+"DP_LIGHTSTYLE_STATICVALUE",
+"DP_LITSPRITES",
+"DP_LITSUPPORT",
+"DP_MONSTERWALK",
+"DP_MOVETYPEBOUNCEMISSILE",
+"DP_MOVETYPEFLYWORLDONLY",
+"DP_MOVETYPEFOLLOW",
+"DP_NULL_MODEL",
+"DP_QC_ASINACOSATANATAN2TAN",
+"DP_QC_AUTOCVARS",
+"DP_QC_CHANGEPITCH",
+"DP_QC_CMD",
+"DP_QC_COPYENTITY",
+"DP_QC_CRC16",
+"DP_QC_CVAR_DEFSTRING",
+"DP_QC_CVAR_DESCRIPTION",
+"DP_QC_CVAR_STRING",
+"DP_QC_CVAR_TYPE",
+"DP_QC_DIGEST",
+"DP_QC_DIGEST_SHA256",
+"DP_QC_EDICT_NUM",
+"DP_QC_ENTITYDATA",
+"DP_QC_ENTITYSTRING",
+"DP_QC_ETOS",
+"DP_QC_EXTRESPONSEPACKET",
+"DP_QC_FINDCHAIN",
+"DP_QC_FINDCHAINFLAGS",
+"DP_QC_FINDCHAINFLOAT",
+"DP_QC_FINDCHAIN_TOFIELD",
+"DP_QC_FINDFLAGS",
+"DP_QC_FINDFLOAT",
+"DP_QC_FS_SEARCH",
+"DP_QC_GETLIGHT",
+"DP_QC_GETSURFACE",
+"DP_QC_GETSURFACETRIANGLE",
+"DP_QC_GETSURFACEPOINTATTRIBUTE",
+"DP_QC_GETTAGINFO",
+"DP_QC_GETTAGINFO_BONEPROPERTIES",
+"DP_QC_GETTIME",
+"DP_QC_GETTIME_CDTRACK",
+"DP_QC_I18N",
+"DP_QC_LOG",
+"DP_QC_MINMAXBOUND",
+"DP_QC_MULTIPLETEMPSTRINGS",
+"DP_QC_NUM_FOR_EDICT",
+"DP_QC_RANDOMVEC",
+"DP_QC_SINCOSSQRTPOW",
+"DP_QC_SPRINTF",
+"DP_QC_STRFTIME",
+"DP_QC_STRINGBUFFERS",
+"DP_QC_STRINGBUFFERS_CVARLIST",
+"DP_QC_STRINGBUFFERS_EXT_WIP",
+"DP_QC_STRINGCOLORFUNCTIONS",
+"DP_QC_STRING_CASE_FUNCTIONS",
+"DP_QC_STRREPLACE",
+"DP_QC_TOKENIZEBYSEPARATOR",
+"DP_QC_TOKENIZE_CONSOLE",
+"DP_QC_TRACEBOX",
+"DP_QC_TRACETOSS",
+"DP_QC_TRACE_MOVETYPE_HITMODEL",
+"DP_QC_TRACE_MOVETYPE_WORLDONLY",
+"DP_QC_UNLIMITEDTEMPSTRINGS",
+"DP_QC_URI_ESCAPE",
+"DP_QC_URI_GET",
+"DP_QC_URI_POST",
+"DP_QC_VECTOANGLES_WITH_ROLL",
+"DP_QC_VECTORVECTORS",
+"DP_QC_WHICHPACK",
+"DP_QUAKE2_MODEL",
+"DP_QUAKE2_SPRITE",
+"DP_QUAKE3_MAP",
+"DP_QUAKE3_MODEL",
+"DP_REGISTERCVAR",
+"DP_SKELETONOBJECTS",
+"DP_SND_DIRECTIONLESSATTNNONE",
+"DP_SND_FAKETRACKS",
+"DP_SND_SOUND7_WIP1",
+"DP_SND_SOUND7_WIP2",
+"DP_SND_OGGVORBIS",
+"DP_SND_SETPARAMS",
+"DP_SND_STEREOWAV",
+"DP_SND_GETSOUNDTIME",
+"DP_VIDEO_DPV",
+"DP_VIDEO_SUBTITLES",
+"DP_SOLIDCORPSE",
+"DP_SPRITE32",
+"DP_SV_BOTCLIENT",
+"DP_SV_BOUNCEFACTOR",
+"DP_SV_CLIENTCAMERA",
+"DP_SV_CLIENTCOLORS",
+"DP_SV_CLIENTNAME",
+"DP_SV_CMD",
+"DP_SV_CUSTOMIZEENTITYFORCLIENT",
+"DP_SV_DISABLECLIENTPREDICTION",
+"DP_SV_DISCARDABLEDEMO",
+"DP_SV_DRAWONLYTOCLIENT",
+"DP_SV_DROPCLIENT",
+"DP_SV_EFFECT",
+"DP_SV_ENTITYCONTENTSTRANSITION",
+"DP_SV_MODELFLAGS_AS_EFFECTS",
+"DP_SV_MOVETYPESTEP_LANDEVENT",
+"DP_SV_NETADDRESS",
+"DP_SV_NODRAWTOCLIENT",
+"DP_SV_ONENTITYNOSPAWNFUNCTION",
+"DP_SV_ONENTITYPREPOSTSPAWNFUNCTION",
+"DP_SV_PING",
+"DP_SV_PING_PACKETLOSS",
+"DP_SV_PLAYERPHYSICS",
+"DP_PHYSICS_ODE",
+"DP_SV_POINTPARTICLES",
+"DP_SV_POINTSOUND",
+"DP_SV_PRECACHEANYTIME",
+"DP_SV_PRINT",
+"DP_SV_PUNCHVECTOR",
+"DP_SV_QCSTATUS",
+"DP_SV_ROTATINGBMODEL",
+"DP_SV_SETCOLOR",
+"DP_SV_SHUTDOWN",
+"DP_SV_SLOWMO",
+"DP_SV_SPAWNFUNC_PREFIX",
+"DP_SV_WRITEPICTURE",
+"DP_SV_WRITEUNTERMINATEDSTRING",
+"DP_TE_BLOOD",
+"DP_TE_BLOODSHOWER",
+"DP_TE_CUSTOMFLASH",
+"DP_TE_EXPLOSIONRGB",
+"DP_TE_FLAMEJET",
+"DP_TE_PARTICLECUBE",
+"DP_TE_PARTICLERAIN",
+"DP_TE_PARTICLESNOW",
+"DP_TE_PLASMABURN",
+"DP_TE_QUADEFFECTS1",
+"DP_TE_SMALLFLASH",
+"DP_TE_SPARK",
+"DP_TE_STANDARDEFFECTBUILTINS",
+"DP_TRACE_HITCONTENTSMASK_SURFACEINFO"
+"DP_USERMOVETYPES",
+"DP_VIEWZOOM",
+"EXT_BITSHIFT",
+"FRIK_FILE",
+"FTE_CSQC_SKELETONOBJECTS",
+"FTE_QC_CHECKPVS",
+"FTE_STRINGS",
+"KRIMZON_SV_PARSECLIENTCOMMAND",
+"NEH_CMD_PLAY2",
+"NEH_RESTOREGAME",
+"NEXUIZ_PLAYERMODEL",
+"NXQ_GFX_LETTERBOX",
+"PRYDON_CLIENTCURSOR",
+"TENEBRAE_GFX_DLIGHTS",
+"TW_SV_STEPCONTROL",
+"ZQ_PAUSE",
+"DP_RM_CLIPGROUP",
+NULL
+//"EXT_CSQC" // not ready yet
+};
 
 /*
 =================
index 127f2bf36c8afc86cf81dfbf5adb1ededfa8111a..24ea6482d515ced9dc5262055acfb2bd64e5990e 100644 (file)
@@ -5,9 +5,9 @@
 #include <io.h>
 #include "conio.h"
 #else
+#include <sys/time.h>
 #include <unistd.h>
 #include <fcntl.h>
-#include <time.h>
 #endif
 
 #include <signal.h>
@@ -21,9 +21,7 @@ sys_t sys;
 // =======================================================================
 void Sys_Shutdown (void)
 {
-#ifdef FNDELAY
-       fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY);
-#endif
+       fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~O_NDELAY);
        fflush(stdout);
 }
 
@@ -33,9 +31,7 @@ void Sys_Error (const char *error, ...)
        char string[MAX_INPUTLINE];
 
 // change stdin to non blocking
-#ifdef FNDELAY
-       fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY);
-#endif
+       fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~O_NDELAY);
 
        va_start (argptr,error);
        dpvsnprintf (string, sizeof (string), error, argptr);
@@ -51,13 +47,11 @@ void Sys_PrintToTerminal(const char *text)
 {
        if(sys.outfd < 0)
                return;
-#ifdef FNDELAY
        // BUG: for some reason, NDELAY also affects stdout (1) when used on stdin (0).
        // this is because both go to /dev/tty by default!
        {
                int origflags = fcntl (sys.outfd, F_GETFL, 0);
-               fcntl (sys.outfd, F_SETFL, origflags & ~FNDELAY);
-#endif
+               fcntl (sys.outfd, F_SETFL, origflags & ~O_NDELAY);
 #ifdef WIN32
 #define write _write
 #endif
@@ -68,10 +62,8 @@ void Sys_PrintToTerminal(const char *text)
                                break; // sorry, I cannot do anything about this error - without an output
                        text += written;
                }
-#ifdef FNDELAY
                fcntl (sys.outfd, F_SETFL, origflags);
        }
-#endif
        //fprintf(stdout, "%s", text);
 }
 
@@ -164,9 +156,7 @@ int main (int argc, char **argv)
        else
                sys.outfd = 1;
 
-#ifdef FNDELAY
-       fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY);
-#endif
+       fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | O_NDELAY);
 
        Host_Main();
 
index 06d72ae921fc4af8be1f1186ef501a28144d046b..9285f55dadf29ba177c00ddec7beb718438f2ad2 100644 (file)
--- a/sys_sdl.c
+++ b/sys_sdl.c
 
 #ifdef __ANDROID__
 #include <android/log.h>
-
-#ifndef FNDELAY
-#define FNDELAY                O_NDELAY
-#endif
 #endif
 
 #include <signal.h>
@@ -41,7 +37,7 @@ void Sys_Shutdown (void)
        Sys_AllowProfiling(false);
 #endif
 #ifndef WIN32
-       fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY);
+       fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~O_NDELAY);
 #endif
        fflush(stdout);
        SDL_Quit();
@@ -55,7 +51,7 @@ void Sys_Error (const char *error, ...)
 
 // change stdin to non blocking
 #ifndef WIN32
-       fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY);
+       fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~O_NDELAY);
 #endif
 
        va_start (argptr,error);
@@ -81,12 +77,12 @@ void Sys_PrintToTerminal(const char *text)
 #else
        if(sys.outfd < 0)
                return;
-#ifdef FNDELAY
+#ifdef O_NDELAY
        // BUG: for some reason, NDELAY also affects stdout (1) when used on stdin (0).
        // this is because both go to /dev/tty by default!
        {
                int origflags = fcntl (sys.outfd, F_GETFL, 0);
-               fcntl (sys.outfd, F_SETFL, origflags & ~FNDELAY);
+               fcntl (sys.outfd, F_SETFL, origflags & ~O_NDELAY);
 #endif
 #ifdef WIN32
 #define write _write
@@ -98,7 +94,7 @@ void Sys_PrintToTerminal(const char *text)
                                break; // sorry, I cannot do anything about this error - without an output
                        text += written;
                }
-#ifdef FNDELAY
+#ifdef O_NDELAY
                fcntl (sys.outfd, F_SETFL, origflags);
        }
 #endif
@@ -218,7 +214,7 @@ int main (int argc, char *argv[])
                sys.outfd = 1;
 
 #ifndef WIN32
-       fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY);
+       fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | O_NDELAY);
 #endif
 
        // we don't know which systems we'll want to init, yet...
index b88e6ecb5a8afb55741a0529e9738d7d648027d5..b2c007bc4179ea1c179abb93d399a56e4db4e366 100644 (file)
--- a/vid_sdl.c
+++ b/vid_sdl.c
@@ -1606,10 +1606,15 @@ static qboolean VID_InitModeGL(viddef_mode_t *mode)
        Cvar_SetQuick(&gl_info_driver, gl_driver);
 
        // LadyHavoc: report supported extensions
+       Con_DPrintf("\nQuakeC extensions for server and client:");
+       for (i = 0; vm_sv_extensions[i]; i++)
+               Con_DPrintf(" %s", vm_sv_extensions[i]);
+       Con_DPrintf("\n");
 #ifdef CONFIG_MENU
-       Con_DPrintf("\nQuakeC extensions for server and client: %s\nQuakeC extensions for menu: %s\n", vm_sv_extensions, vm_m_extensions);
-#else
-       Con_DPrintf("\nQuakeC extensions for server and client: %s\n", vm_sv_extensions);
+       Con_DPrintf("\nQuakeC extensions for menu:");
+       for (i = 0; vm_m_extensions[i]; i++)
+               Con_DPrintf(" %s", vm_m_extensions[i]);
+       Con_DPrintf("\n");
 #endif
 
        // clear to black (loading plaque will be seen over this)
diff --git a/zone.c b/zone.c
index 5a0c8987a0c3e2f184999aa0ed09e2ff46dc72bc..69d053d853df662b7da939629890e418bafe634b 100644 (file)
--- a/zone.c
+++ b/zone.c
@@ -758,9 +758,9 @@ void Mem_ExpandableArray_FreeRecord(memexpandablearray_t *l, void *record) // co
                {
                        j = (p - l->arrays[i].data) / l->recordsize;
                        if (p != l->arrays[i].data + j * l->recordsize)
-                               Sys_Error("Mem_ExpandableArray_FreeRecord: no such record %p\n", p);
+                               Sys_Error("Mem_ExpandableArray_FreeRecord: no such record %p\n", (void *)p);
                        if (!l->arrays[i].allocflags[j])
-                               Sys_Error("Mem_ExpandableArray_FreeRecord: record %p is already free!\n", p);
+                               Sys_Error("Mem_ExpandableArray_FreeRecord: record %p is already free!\n", (void *)p);
                        l->arrays[i].allocflags[j] = false;
                        l->arrays[i].numflaggedrecords--;
                        return;