mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-31 00:30:57 +00:00
Fix a bunch of bit-rot.
This commit is contained in:
parent
f522e58d53
commit
0de0eb2fc7
8 changed files with 15 additions and 11 deletions
|
@ -74,9 +74,9 @@ AH_VERBATIM([HAVE___ATTRIBUTE__GCC_STRUCT],
|
||||||
#endif])
|
#endif])
|
||||||
|
|
||||||
AC_MSG_CHECKING(for __builtin_expect)
|
AC_MSG_CHECKING(for __builtin_expect)
|
||||||
AC_TRY_COMPILE(
|
AC_TRY_LINK(
|
||||||
[long (*foo) (long, long) = __builtin_expect;],
|
[int x;],
|
||||||
[],
|
[if (__builtin_expect(!x, 1)) {}],
|
||||||
AC_DEFINE(HAVE___BUILTIN_EXPECT)
|
AC_DEFINE(HAVE___BUILTIN_EXPECT)
|
||||||
AC_MSG_RESULT(yes),
|
AC_MSG_RESULT(yes),
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
|
|
|
@ -346,8 +346,8 @@ typedef union pr_type_u {
|
||||||
string_t string_var;
|
string_t string_var;
|
||||||
func_t func_var;
|
func_t func_var;
|
||||||
pr_int_t entity_var;
|
pr_int_t entity_var;
|
||||||
float vector_var[1]; // really 3, but this structure must be 32 bits
|
float vector_var[0]; // really 3, but this structure must be 32 bits
|
||||||
float quat_var[1]; // really 4, but this structure must be 32 bits
|
float quat_var[0]; // really 4, but this structure must be 32 bits
|
||||||
pr_int_t integer_var;
|
pr_int_t integer_var;
|
||||||
pointer_t pointer_var;
|
pointer_t pointer_var;
|
||||||
pr_uint_t uinteger_var;
|
pr_uint_t uinteger_var;
|
||||||
|
|
|
@ -221,7 +221,7 @@ struct edict_s {
|
||||||
int entnum; ///< number of this entity
|
int entnum; ///< number of this entity
|
||||||
float freetime; ///< sv.time when the object was freed
|
float freetime; ///< sv.time when the object was freed
|
||||||
void *edata; ///< external per-edict data
|
void *edata; ///< external per-edict data
|
||||||
pr_type_t v[1]; ///< fields from progs
|
pr_type_t v[]; ///< fields from progs
|
||||||
};
|
};
|
||||||
|
|
||||||
// pr_edict.c
|
// pr_edict.c
|
||||||
|
|
|
@ -177,7 +177,7 @@ PR_LoadProgsFile (progs_t *pr, QFile *file, int size, int max_edicts, int zone)
|
||||||
// size of edict asked for by progs
|
// size of edict asked for by progs
|
||||||
pr->pr_edict_size = max (1, progs.entityfields) * 4;
|
pr->pr_edict_size = max (1, progs.entityfields) * 4;
|
||||||
// size of engine data
|
// size of engine data
|
||||||
pr->pr_edict_size += sizeof (edict_t) - sizeof (pr_type_t);
|
pr->pr_edict_size += sizeof (edict_t);
|
||||||
// round off to next highest whole word address (esp for Alpha)
|
// round off to next highest whole word address (esp for Alpha)
|
||||||
// this ensures that pointers in the engine data area are always
|
// this ensures that pointers in the engine data area are always
|
||||||
// properly aligned
|
// properly aligned
|
||||||
|
|
|
@ -98,11 +98,13 @@ loaded_plugin_delete (void *lp, void *unused)
|
||||||
static int
|
static int
|
||||||
pi_close_lib (void *handle)
|
pi_close_lib (void *handle)
|
||||||
{
|
{
|
||||||
|
if (handle) {
|
||||||
#if defined(HAVE_DLOPEN)
|
#if defined(HAVE_DLOPEN)
|
||||||
return (dlclose (handle) == 0);
|
return (dlclose (handle) == 0);
|
||||||
#elif defined (_WIN32)
|
#elif defined (_WIN32)
|
||||||
return (FreeLibrary (handle) == 0);
|
return (FreeLibrary (handle) == 0);
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ server_t sv;
|
||||||
server_static_t svs;
|
server_static_t svs;
|
||||||
double sv_frametime;
|
double sv_frametime;
|
||||||
|
|
||||||
char localmodels[MAX_MODELS][5]; // inline model names for precache
|
char localmodels[MAX_MODELS][6]; // inline model names for precache
|
||||||
|
|
||||||
int sv_protocol = PROTOCOL_FITZQUAKE;
|
int sv_protocol = PROTOCOL_FITZQUAKE;
|
||||||
|
|
||||||
|
|
|
@ -348,7 +348,7 @@ gettoklen (char *str, int req, char delim)
|
||||||
int len = 0;
|
int len = 0;
|
||||||
|
|
||||||
start = gettokstart (str, req, delim);
|
start = gettokstart (str, req, delim);
|
||||||
if (start == '\0') {
|
if (*start == '\0') {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
while (*start != delim && *start != '\0') {
|
while (*start != delim && *start != '\0') {
|
||||||
|
|
|
@ -296,7 +296,9 @@ convert_relop (const char *relop)
|
||||||
#ifdef YY_FLEX_REALLOC_HACK
|
#ifdef YY_FLEX_REALLOC_HACK
|
||||||
static __attribute__ ((used)) void *(*const yy_flex_realloc_hack)(void *,yy_size_t) = yy_flex_realloc;
|
static __attribute__ ((used)) void *(*const yy_flex_realloc_hack)(void *,yy_size_t) = yy_flex_realloc;
|
||||||
#else
|
#else
|
||||||
|
#ifdef yyunput
|
||||||
static __attribute__ ((used)) void (*yyunput_hack)(int, char*) = yyunput;
|
static __attribute__ ((used)) void (*yyunput_hack)(int, char*) = yyunput;
|
||||||
|
#endif
|
||||||
static __attribute__ ((used)) int (*input_hack)(void) = input;
|
static __attribute__ ((used)) int (*input_hack)(void) = input;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue