FIXUP make code c24 compliant

this needs to be tested on other platforms
This commit is contained in:
Alug committed 2025-05-02 12:50:41 +02:00
1 parent 0ae6f8fa16
commit b1d8930b5a
6 files changed
+11 -26

No files matched your search

-5
View File
@@ -300,11 +300,6 @@ ifdef X86_64
endif
endif
# apparently MingW just completely ignores everything so just always force this shit
# FIXME: we should port our code to c24
CFLAGS+=-std=gnu17
CPPFLAGS+=-std=gnu17
ifndef NOPNG
OPTS+=-DHAVE_PNG
+1 -1
View File
@@ -1695,7 +1695,7 @@ static void SV_SendPlayerInfo(INT32 node)
continue;
}
if (players[i].ingame == UINT8_MAX || !players[i].ingame)
if (!players[i].ingame)
{
netbuffer->u.playerinfo[i].node = 255; // This slot is empty.
continue;
+2 -1
View File
@@ -28,7 +28,8 @@
// To compile this as "ANSI C with classes" we will need to handle the various
// action functions cleanly.
//
typedef void (*actionf_v)();
struct mobj_s;
typedef void (*actionf_v)(struct mobj_s *);
typedef void (*actionf_p1)(void *);
typedef union
+2 -17
View File
@@ -155,23 +155,8 @@ size_t strlcpy(char *dst, const char *src, size_t siz);
#define STRBUFCPY(dst,src) strlcpy(dst, src, sizeof dst)
/* Boolean type definition */
// \note __BYTEBOOL__ used to be set above if "macintosh" was defined,
// if macintosh's version of boolean type isn't needed anymore, then isn't this macro pointless now?
#ifndef __BYTEBOOL__
#define __BYTEBOOL__
//faB: clean that up !!
#if defined( _MSC_VER) && (_MSC_VER >= 1800) // MSVC 2013 and forward
#include "stdbool.h"
#elif defined (_WIN32)
#define false FALSE // use windows types
#define true TRUE
#define boolean BOOL
#else
typedef enum {false, true} boolean;
#endif
#endif // __BYTEBOOL__
#include "stdbool.h"
typedef bool boolean;
/* 7.18.2.1 Limits of exact-width integer types */
#ifndef INT8_MIN
+4 -1
View File
@@ -7806,7 +7806,10 @@ static void M_PlaybackRewind(INT32 choice)
S_PauseAudio();
}
else
demo.rewinding = paused = true;
{
demo.rewinding = true;
paused = true;
}
}
else if (lastconfirmtime + TICRATE/2 < I_GetTime())
{
+2 -1
View File
@@ -1710,7 +1710,8 @@ static void S_QueueMusic(const char *mmusic, UINT16 mflags, boolean looping, UIN
static void S_ClearQueue(void)
{
queue.name[0] = queue.flags = queue.looping = queue.position = queue.fadeinms = 0;
queue.name[0] = queue.flags = queue.position = queue.fadeinms = 0;
queue.looping = false;
}
static void S_ChangeMusicToQueue(void)