Wrap __attribute__s in macros
This commit is contained in:
parent
f976711fb4
commit
07b9c1bd83
|
|
@ -30,7 +30,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
* See MASM snapvector.asm for commentary
|
||||
*/
|
||||
|
||||
static unsigned char ssemask[16] __attribute__((aligned(16))) =
|
||||
static unsigned char ssemask[16] Q_ALIGN(16) =
|
||||
{
|
||||
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00\x00\x00\x00"
|
||||
};
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
extern aas_t aasworld;
|
||||
|
||||
//AAS error message
|
||||
void QDECL AAS_Error(char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
void QDECL AAS_Error(char *fmt, ...) Q_PRINTF_FUNC(1, 2);
|
||||
//set AAS initialized
|
||||
void AAS_SetInitialized(void);
|
||||
//setup AAS with the given number of entities and clients
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ typedef struct bot_entitystate_s
|
|||
typedef struct botlib_import_s
|
||||
{
|
||||
//print messages from the bot library
|
||||
void (QDECL *Print)(int type, char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
|
||||
void (QDECL *Print)(int type, char *fmt, ...) Q_PRINTF_FUNC(2, 3);
|
||||
//trace a bbox through the world
|
||||
void (*Trace)(bsp_trace_t *trace, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int passent, int contentmask);
|
||||
//trace a bbox against a specific entity
|
||||
|
|
|
|||
|
|
@ -36,9 +36,9 @@ void Log_Close(void);
|
|||
//close log file if present
|
||||
void Log_Shutdown(void);
|
||||
//write to the current opened log file
|
||||
void QDECL Log_Write(char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
void QDECL Log_Write(char *fmt, ...) Q_PRINTF_FUNC(1, 2);
|
||||
//write to the current opened log file with a time stamp
|
||||
void QDECL Log_WriteTimeStamped(char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
void QDECL Log_WriteTimeStamped(char *fmt, ...) Q_PRINTF_FUNC(1, 2);
|
||||
//returns a pointer to the log file
|
||||
FILE *Log_FilePointer(void);
|
||||
//flush log file
|
||||
|
|
|
|||
|
|
@ -148,9 +148,9 @@ source_t *LoadSourceMemory(char *ptr, int length, char *name);
|
|||
//free the given source
|
||||
void FreeSource(source_t *source);
|
||||
//print a source error
|
||||
void QDECL SourceError(source_t *source, char *str, ...) __attribute__ ((format (printf, 2, 3)));
|
||||
void QDECL SourceError(source_t *source, char *str, ...) Q_PRINTF_FUNC(2, 3);
|
||||
//print a source warning
|
||||
void QDECL SourceWarning(source_t *source, char *str, ...) __attribute__ ((format (printf, 2, 3)));
|
||||
void QDECL SourceWarning(source_t *source, char *str, ...) Q_PRINTF_FUNC(2, 3);
|
||||
|
||||
#ifdef BSPC
|
||||
// some of BSPC source does include game/q_shared.h and some does not
|
||||
|
|
|
|||
|
|
@ -240,8 +240,8 @@ void FreeScript(script_t *script);
|
|||
//set the base folder to load files from
|
||||
void PS_SetBaseFolder(char *path);
|
||||
//print a script error with filename and line number
|
||||
void QDECL ScriptError(script_t *script, char *str, ...) __attribute__ ((format (printf, 2, 3)));
|
||||
void QDECL ScriptError(script_t *script, char *str, ...) Q_PRINTF_FUNC(2, 3);
|
||||
//print a script warning with filename and line number
|
||||
void QDECL ScriptWarning(script_t *script, char *str, ...) __attribute__ ((format (printf, 2, 3)));
|
||||
void QDECL ScriptWarning(script_t *script, char *str, ...) Q_PRINTF_FUNC(2, 3);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1198,8 +1198,8 @@ extern vmCvar_t cg_obeliskRespawnDelay;
|
|||
const char *CG_ConfigString( int index );
|
||||
const char *CG_Argv( int arg );
|
||||
|
||||
void QDECL CG_Printf( const char *msg, ... ) __attribute__ ((format (printf, 1, 2)));
|
||||
void QDECL CG_Error( const char *msg, ... ) __attribute__ ((noreturn, format (printf, 1, 2)));
|
||||
void QDECL CG_Printf( const char *msg, ... ) Q_PRINTF_FUNC(1, 2);
|
||||
void QDECL CG_Error( const char *msg, ... ) Q_NO_RETURN Q_PRINTF_FUNC(1, 2);
|
||||
|
||||
void CG_StartMusic( void );
|
||||
|
||||
|
|
@ -1483,7 +1483,7 @@ void CG_CheckChangedPredictableEvents( playerState_t *ps );
|
|||
void trap_Print( const char *fmt );
|
||||
|
||||
// abort the game
|
||||
void trap_Error(const char *fmt) __attribute__((noreturn));
|
||||
void trap_Error(const char *fmt) Q_NO_RETURN;
|
||||
|
||||
// milliseconds should only be used for performance tuning, never
|
||||
// for anything game related. Get time from the CG_DrawActiveFrame parameter
|
||||
|
|
|
|||
|
|
@ -3121,7 +3121,7 @@ CL_RefPrintf
|
|||
DLL glue
|
||||
================
|
||||
*/
|
||||
static __attribute__ ((format (printf, 2, 3))) void QDECL CL_RefPrintf( int print_level, const char *fmt, ...) {
|
||||
static Q_PRINTF_FUNC(2, 3) void QDECL CL_RefPrintf( int print_level, const char *fmt, ...) {
|
||||
va_list argptr;
|
||||
char msg[MAXPRINTMSG];
|
||||
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ extern float floattime;
|
|||
#define FloatTime() floattime
|
||||
|
||||
// from the game source
|
||||
void QDECL BotAI_Print(int type, char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
|
||||
void QDECL BotAI_Print(int type, char *fmt, ...) Q_PRINTF_FUNC(2, 3);
|
||||
void QDECL QDECL BotAI_BotInitialChat( bot_state_t *bs, char *type, ... );
|
||||
void BotAI_Trace(bsp_trace_t *bsptrace, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int passent, int contentmask);
|
||||
int BotAI_GetClientState( int clientNum, playerState_t *state );
|
||||
|
|
|
|||
|
|
@ -26,13 +26,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#if !defined( BG_LIB_H ) && defined( Q3_VM )
|
||||
#define BG_LIB_H
|
||||
|
||||
//Ignore __attribute__ on non-gcc platforms
|
||||
#ifndef __GNUC__
|
||||
#ifndef __attribute__
|
||||
#define __attribute__(x)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL ((void *)0)
|
||||
#endif
|
||||
|
|
@ -103,7 +96,7 @@ long strtol( const char *nptr, char **endptr, int base );
|
|||
|
||||
int Q_vsnprintf( char *buffer, size_t length, const char *fmt, va_list argptr );
|
||||
|
||||
int sscanf( const char *buffer, const char *fmt, ... ) __attribute__ ((format (scanf, 2, 3)));
|
||||
int sscanf( const char *buffer, const char *fmt, ... ) Q_SCANF_FUNC(2, 3);
|
||||
|
||||
// Memory functions
|
||||
void *memmove( void *dest, const void *src, size_t count );
|
||||
|
|
|
|||
|
|
@ -604,10 +604,10 @@ void SetLeader(int team, int client);
|
|||
void CheckTeamLeader( int team );
|
||||
void G_RunThink (gentity_t *ent);
|
||||
void AddTournamentQueue(gclient_t *client);
|
||||
void QDECL G_LogPrintf( const char *fmt, ... ) __attribute__ ((format (printf, 1, 2)));
|
||||
void QDECL G_LogPrintf( const char *fmt, ... ) Q_PRINTF_FUNC(1, 2);
|
||||
void SendScoreboardMessageToAllClients( void );
|
||||
void QDECL G_Printf( const char *fmt, ... ) __attribute__ ((format (printf, 1, 2)));
|
||||
void QDECL G_Error( const char *fmt, ... ) __attribute__ ((noreturn, format (printf, 1, 2)));
|
||||
void QDECL G_Printf( const char *fmt, ... ) Q_PRINTF_FUNC(1, 2);
|
||||
void QDECL G_Error( const char *fmt, ... ) Q_NO_RETURN Q_PRINTF_FUNC(1, 2);
|
||||
|
||||
//
|
||||
// g_client.c
|
||||
|
|
@ -747,7 +747,7 @@ extern vmCvar_t g_proxMineTimeout;
|
|||
extern vmCvar_t g_localTeamPref;
|
||||
|
||||
void trap_Print( const char *text );
|
||||
void trap_Error( const char *text ) __attribute__((noreturn));
|
||||
void trap_Error( const char *text ) Q_NO_RETURN;
|
||||
int trap_Milliseconds( void );
|
||||
int trap_RealTime( qtime_t *qtime );
|
||||
int trap_Argc( void );
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ const char *TeamColorString(int team) {
|
|||
}
|
||||
|
||||
// NULL for everyone
|
||||
static __attribute__ ((format (printf, 2, 3))) void QDECL PrintMsg( gentity_t *ent, const char *fmt, ... ) {
|
||||
static Q_PRINTF_FUNC(2, 3) void QDECL PrintMsg( gentity_t *ent, const char *fmt, ... ) {
|
||||
char msg[1024];
|
||||
va_list argptr;
|
||||
char *p;
|
||||
|
|
|
|||
|
|
@ -626,7 +626,7 @@ void UI_SPSkillMenu_Cache( void );
|
|||
// ui_syscalls.c
|
||||
//
|
||||
void trap_Print( const char *string );
|
||||
void trap_Error( const char *string ) __attribute__((noreturn));
|
||||
void trap_Error( const char *string ) Q_NO_RETURN;
|
||||
int trap_Milliseconds( void );
|
||||
void trap_Cvar_Register( vmCvar_t *vmCvar, const char *varName, const char *defaultValue, int flags );
|
||||
void trap_Cvar_Update( vmCvar_t *vmCvar );
|
||||
|
|
|
|||
|
|
@ -2280,7 +2280,7 @@ Just throw a fatal error to
|
|||
test error shutdown procedures
|
||||
=============
|
||||
*/
|
||||
static void __attribute__((__noreturn__)) Com_Error_f (void) {
|
||||
static void Q_NO_RETURN Com_Error_f (void) {
|
||||
if ( Cmd_Argc() > 1 ) {
|
||||
Com_Error( ERR_DROP, "Testing drop error" );
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -753,7 +753,7 @@ int Q_isalpha( int c )
|
|||
qboolean Q_isanumber( const char *s )
|
||||
{
|
||||
char *p;
|
||||
double UNUSED_VAR d;
|
||||
double Q_UNUSED_VAR d;
|
||||
|
||||
if( *s == '\0' )
|
||||
return qfalse;
|
||||
|
|
|
|||
|
|
@ -105,17 +105,18 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
//#pragma intrinsic( memset, memcpy )
|
||||
#endif
|
||||
|
||||
//Ignore __attribute__ on non-gcc platforms
|
||||
#ifndef __GNUC__
|
||||
#ifndef __attribute__
|
||||
#define __attribute__(x)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define UNUSED_VAR __attribute__((unused))
|
||||
#define Q_UNUSED_VAR __attribute__((unused))
|
||||
#define Q_NO_RETURN __attribute__((noreturn))
|
||||
#define Q_PRINTF_FUNC(fmt, va) __attribute__((format(printf, fmt, va)))
|
||||
#define Q_SCANF_FUNC(fmt, va) __attribute__((format(scanf, fmt, va)))
|
||||
#define Q_ALIGN(x) __attribute__((aligned(x)))
|
||||
#else
|
||||
#define UNUSED_VAR
|
||||
#define Q_UNUSED_VAR
|
||||
#define Q_NO_RETURN
|
||||
#define Q_PRINTF_FUNC(fmt, va)
|
||||
#define Q_SCANF_FUNC(fmt, va)
|
||||
#define Q_ALIGN(x)
|
||||
#endif
|
||||
|
||||
#if (defined _MSC_VER)
|
||||
|
|
@ -199,12 +200,6 @@ typedef int clipHandle_t;
|
|||
|
||||
#define PADP(base, alignment) ((void *) PAD((intptr_t) (base), (alignment)))
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define QALIGN(x) __attribute__((aligned(x)))
|
||||
#else
|
||||
#define QALIGN(x)
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL ((void *)0)
|
||||
#endif
|
||||
|
|
@ -733,8 +728,8 @@ int COM_GetCurrentParseLine( void );
|
|||
char *COM_Parse( char **data_p );
|
||||
char *COM_ParseExt( char **data_p, qboolean allowLineBreak );
|
||||
int COM_Compress( char *data_p );
|
||||
void COM_ParseError( char *format, ... ) __attribute__ ((format (printf, 1, 2)));
|
||||
void COM_ParseWarning( char *format, ... ) __attribute__ ((format (printf, 1, 2)));
|
||||
void COM_ParseError( char *format, ... ) Q_PRINTF_FUNC(1, 2);
|
||||
void COM_ParseWarning( char *format, ... ) Q_PRINTF_FUNC(1, 2);
|
||||
//int COM_ParseInfos( char *buf, int max, char infos[][MAX_INFO_STRING] );
|
||||
|
||||
#define MAX_TOKENLENGTH 1024
|
||||
|
|
@ -769,7 +764,7 @@ void Parse2DMatrix (char **buf_p, int y, int x, float *m);
|
|||
void Parse3DMatrix (char **buf_p, int z, int y, int x, float *m);
|
||||
int Com_HexStrToInt( const char *str );
|
||||
|
||||
int QDECL Com_sprintf (char *dest, int size, const char *fmt, ...) __attribute__ ((format (printf, 3, 4)));
|
||||
int QDECL Com_sprintf (char *dest, int size, const char *fmt, ...) Q_PRINTF_FUNC(3, 4);
|
||||
|
||||
char *Com_SkipTokens( char *s, int numTokens, char *sep );
|
||||
char *Com_SkipCharset( char *s, char *sep );
|
||||
|
|
@ -847,7 +842,7 @@ float LittleFloat (const float *l);
|
|||
|
||||
void Swap_Init (void);
|
||||
*/
|
||||
char * QDECL va(char *format, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
char * QDECL va(char *format, ...) Q_PRINTF_FUNC(1, 2);
|
||||
|
||||
#define TRUNCATE_LENGTH 64
|
||||
void Com_TruncateLongString( char *buffer, const char *s );
|
||||
|
|
@ -866,8 +861,8 @@ qboolean Info_Validate( const char *s );
|
|||
void Info_NextPair( const char **s, char *key, char *value );
|
||||
|
||||
// this is only here so the functions in q_shared.c and bg_*.c can link
|
||||
void QDECL Com_Error( int level, const char *error, ... ) __attribute__ ((noreturn, format(printf, 2, 3)));
|
||||
void QDECL Com_Printf( const char *msg, ... ) __attribute__ ((format (printf, 1, 2)));
|
||||
void QDECL Com_Error( int level, const char *error, ... ) Q_NO_RETURN Q_PRINTF_FUNC(2, 3);
|
||||
void QDECL Com_Printf( const char *msg, ... ) Q_PRINTF_FUNC(1, 2);
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -25,13 +25,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
|
||||
#include "../qcommon/cm_public.h"
|
||||
|
||||
//Ignore __attribute__ on non-gcc platforms
|
||||
#ifndef __GNUC__
|
||||
#ifndef __attribute__
|
||||
#define __attribute__(x)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//#define PRE_RELEASE_DEMO
|
||||
|
||||
//============================================================================
|
||||
|
|
@ -172,7 +165,7 @@ void NET_Restart_f( void );
|
|||
void NET_Config( qboolean enableNetworking );
|
||||
void NET_FlushPacketQueue(void);
|
||||
void NET_SendPacket (netsrc_t sock, int length, const void *data, netadr_t to);
|
||||
void QDECL NET_OutOfBandPrint( netsrc_t net_socket, netadr_t adr, const char *format, ...) __attribute__ ((format (printf, 3, 4)));
|
||||
void QDECL NET_OutOfBandPrint( netsrc_t net_socket, netadr_t adr, const char *format, ...) Q_PRINTF_FUNC(3, 4);
|
||||
void QDECL NET_OutOfBandData( netsrc_t sock, netadr_t adr, byte *format, int len );
|
||||
|
||||
qboolean NET_CompareAdr (netadr_t a, netadr_t b);
|
||||
|
|
@ -692,7 +685,7 @@ int FS_FTell( fileHandle_t f );
|
|||
|
||||
void FS_Flush( fileHandle_t f );
|
||||
|
||||
void QDECL FS_Printf( fileHandle_t f, const char *fmt, ... ) __attribute__ ((format (printf, 2, 3)));
|
||||
void QDECL FS_Printf( fileHandle_t f, const char *fmt, ... ) Q_PRINTF_FUNC(2, 3);
|
||||
// like fprintf
|
||||
|
||||
int FS_FOpenFileByMode( const char *qpath, fileHandle_t *f, fsMode_t mode );
|
||||
|
|
@ -821,10 +814,10 @@ void Info_Print( const char *s );
|
|||
|
||||
void Com_BeginRedirect (char *buffer, int buffersize, void (*flush)(char *));
|
||||
void Com_EndRedirect( void );
|
||||
void QDECL Com_Printf( const char *fmt, ... ) __attribute__ ((format (printf, 1, 2)));
|
||||
void QDECL Com_DPrintf( const char *fmt, ... ) __attribute__ ((format (printf, 1, 2)));
|
||||
void QDECL Com_Error( int code, const char *fmt, ... ) __attribute__ ((noreturn, format(printf, 2, 3)));
|
||||
void Com_Quit_f( void ) __attribute__ ((noreturn));
|
||||
void QDECL Com_Printf( const char *fmt, ... ) Q_PRINTF_FUNC(1, 2);
|
||||
void QDECL Com_DPrintf( const char *fmt, ... ) Q_PRINTF_FUNC(1, 2);
|
||||
void QDECL Com_Error( int code, const char *fmt, ... ) Q_NO_RETURN Q_PRINTF_FUNC(2, 3);
|
||||
void Com_Quit_f( void ) Q_NO_RETURN;
|
||||
void Com_GameRestart(int checksumFeed, qboolean disconnect);
|
||||
|
||||
int Com_Milliseconds( void ); // will be journaled properly
|
||||
|
|
@ -1087,8 +1080,8 @@ qboolean Sys_DllExtension( const char *name );
|
|||
|
||||
char *Sys_GetCurrentUser( void );
|
||||
|
||||
void QDECL Sys_Error( const char *error, ...) __attribute__ ((noreturn, format (printf, 1, 2)));
|
||||
void Sys_Quit (void) __attribute__ ((noreturn));
|
||||
void QDECL Sys_Error( const char *error, ...) Q_NO_RETURN Q_PRINTF_FUNC(1, 2);
|
||||
void Sys_Quit (void) Q_NO_RETURN;
|
||||
char *Sys_GetClipboardData( void ); // note that this isn't journaled...
|
||||
|
||||
void Sys_Print( const char *msg );
|
||||
|
|
|
|||
|
|
@ -27,13 +27,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
// This file must be identical in the quake and utils directories
|
||||
//
|
||||
|
||||
//Ignore __attribute__ on non-gcc platforms
|
||||
#ifndef __GNUC__
|
||||
#ifndef __attribute__
|
||||
#define __attribute__(x)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// surface geometry should not exceed these limits
|
||||
#define SHADER_MAX_VERTEXES 1000
|
||||
#define SHADER_MAX_INDEXES (6*SHADER_MAX_VERTEXES)
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ Error handler for jump/call to invalid instruction number
|
|||
=================
|
||||
*/
|
||||
|
||||
static void __attribute__((__noreturn__)) ErrJump(unsigned num)
|
||||
static void NO_RETURN ErrJump(unsigned num)
|
||||
{
|
||||
Com_Error(ERR_DROP, "program tried to execute code outside VM (%x)", num);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -389,7 +389,7 @@ Error handler for jump/call to invalid instruction number
|
|||
=================
|
||||
*/
|
||||
|
||||
static void __attribute__((__noreturn__)) ErrJump(void)
|
||||
static void Q_NO_RETURN ErrJump(void)
|
||||
{
|
||||
Com_Error(ERR_DROP, "program tried to execute code outside VM");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,10 +106,10 @@ typedef struct {
|
|||
//
|
||||
typedef struct {
|
||||
// print message on the local console
|
||||
void (QDECL *Printf)( int printLevel, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
|
||||
void (QDECL *Printf)( int printLevel, const char *fmt, ...) Q_PRINTF_FUNC(2, 3);
|
||||
|
||||
// abort the game
|
||||
void (QDECL *Error)( int errorLevel, const char *fmt, ...) __attribute__ ((noreturn, format (printf, 2, 3)));
|
||||
void (QDECL *Error)( int errorLevel, const char *fmt, ...) Q_NO_RETURN Q_PRINTF_FUNC(2, 3);
|
||||
|
||||
// milliseconds should only be used for profiling, never
|
||||
// for anything game related. Get time from the refdef
|
||||
|
|
|
|||
|
|
@ -287,10 +287,10 @@ void LerpMeshVertexes_altivec(md3Surface_t *surf, float backlerp)
|
|||
{
|
||||
short *oldXyz, *newXyz, *oldNormals, *newNormals;
|
||||
float *outXyz, *outNormal;
|
||||
float oldXyzScale QALIGN(16);
|
||||
float newXyzScale QALIGN(16);
|
||||
float oldNormalScale QALIGN(16);
|
||||
float newNormalScale QALIGN(16);
|
||||
float oldXyzScale Q_ALIGN(16);
|
||||
float newXyzScale Q_ALIGN(16);
|
||||
float oldNormalScale Q_ALIGN(16);
|
||||
float newNormalScale Q_ALIGN(16);
|
||||
int vertNum;
|
||||
unsigned lat, lng;
|
||||
int numVerts;
|
||||
|
|
|
|||
|
|
@ -1226,16 +1226,16 @@ typedef struct stageVars
|
|||
|
||||
typedef struct shaderCommands_s
|
||||
{
|
||||
glIndex_t indexes[SHADER_MAX_INDEXES] QALIGN(16);
|
||||
vec4_t xyz[SHADER_MAX_VERTEXES] QALIGN(16);
|
||||
vec4_t normal[SHADER_MAX_VERTEXES] QALIGN(16);
|
||||
vec2_t texCoords[SHADER_MAX_VERTEXES][2] QALIGN(16);
|
||||
color4ub_t vertexColors[SHADER_MAX_VERTEXES] QALIGN(16);
|
||||
int vertexDlightBits[SHADER_MAX_VERTEXES] QALIGN(16);
|
||||
glIndex_t indexes[SHADER_MAX_INDEXES] Q_ALIGN(16);
|
||||
vec4_t xyz[SHADER_MAX_VERTEXES] Q_ALIGN(16);
|
||||
vec4_t normal[SHADER_MAX_VERTEXES] Q_ALIGN(16);
|
||||
vec2_t texCoords[SHADER_MAX_VERTEXES][2] Q_ALIGN(16);
|
||||
color4ub_t vertexColors[SHADER_MAX_VERTEXES] Q_ALIGN(16);
|
||||
int vertexDlightBits[SHADER_MAX_VERTEXES] Q_ALIGN(16);
|
||||
|
||||
stageVars_t svars QALIGN(16);
|
||||
stageVars_t svars Q_ALIGN(16);
|
||||
|
||||
color4ub_t constantColor255[SHADER_MAX_VERTEXES] QALIGN(16);
|
||||
color4ub_t constantColor255[SHADER_MAX_VERTEXES] Q_ALIGN(16);
|
||||
|
||||
shader_t *shader;
|
||||
double shaderTime;
|
||||
|
|
|
|||
|
|
@ -2046,24 +2046,24 @@ typedef struct stageVars
|
|||
|
||||
typedef struct shaderCommands_s
|
||||
{
|
||||
glIndex_t indexes[SHADER_MAX_INDEXES] QALIGN(16);
|
||||
vec4_t xyz[SHADER_MAX_VERTEXES] QALIGN(16);
|
||||
int16_t normal[SHADER_MAX_VERTEXES][4] QALIGN(16);
|
||||
int16_t tangent[SHADER_MAX_VERTEXES][4] QALIGN(16);
|
||||
vec2_t texCoords[SHADER_MAX_VERTEXES] QALIGN(16);
|
||||
vec2_t lightCoords[SHADER_MAX_VERTEXES] QALIGN(16);
|
||||
uint16_t color[SHADER_MAX_VERTEXES][4] QALIGN(16);
|
||||
int16_t lightdir[SHADER_MAX_VERTEXES][4] QALIGN(16);
|
||||
//int vertexDlightBits[SHADER_MAX_VERTEXES] QALIGN(16);
|
||||
glIndex_t indexes[SHADER_MAX_INDEXES] Q_ALIGN(16);
|
||||
vec4_t xyz[SHADER_MAX_VERTEXES] Q_ALIGN(16);
|
||||
int16_t normal[SHADER_MAX_VERTEXES][4] Q_ALIGN(16);
|
||||
int16_t tangent[SHADER_MAX_VERTEXES][4] Q_ALIGN(16);
|
||||
vec2_t texCoords[SHADER_MAX_VERTEXES] Q_ALIGN(16);
|
||||
vec2_t lightCoords[SHADER_MAX_VERTEXES] Q_ALIGN(16);
|
||||
uint16_t color[SHADER_MAX_VERTEXES][4] Q_ALIGN(16);
|
||||
int16_t lightdir[SHADER_MAX_VERTEXES][4] Q_ALIGN(16);
|
||||
//int vertexDlightBits[SHADER_MAX_VERTEXES] Q_ALIGN(16);
|
||||
|
||||
void *attribPointers[ATTR_INDEX_COUNT];
|
||||
vao_t *vao;
|
||||
qboolean useInternalVao;
|
||||
qboolean useCacheVao;
|
||||
|
||||
stageVars_t svars QALIGN(16);
|
||||
stageVars_t svars Q_ALIGN(16);
|
||||
|
||||
//color4ub_t constantColor255[SHADER_MAX_VERTEXES] QALIGN(16);
|
||||
//color4ub_t constantColor255[SHADER_MAX_VERTEXES] Q_ALIGN(16);
|
||||
|
||||
shader_t *shader;
|
||||
double shaderTime;
|
||||
|
|
|
|||
|
|
@ -333,7 +333,7 @@ qboolean SVC_RateLimit( leakyBucket_t *bucket, int burst, int period );
|
|||
qboolean SVC_RateLimitAddress( netadr_t from, int burst, int period );
|
||||
|
||||
void SV_FinalMessage (char *message);
|
||||
void QDECL SV_SendServerCommand( client_t *cl, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
|
||||
void QDECL SV_SendServerCommand( client_t *cl, const char *fmt, ...) Q_PRINTF_FUNC(2, 3);
|
||||
|
||||
|
||||
void SV_AddOperatorCommands (void);
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ void BotDrawDebugPolygons(void (*drawPoly)(int color, int numPoints, float *poin
|
|||
BotImport_Print
|
||||
==================
|
||||
*/
|
||||
static __attribute__ ((format (printf, 2, 3))) void QDECL BotImport_Print(int type, char *fmt, ...)
|
||||
static Q_PRINTF_FUNC(2, 3) void QDECL BotImport_Print(int type, char *fmt, ...)
|
||||
{
|
||||
char str[2048];
|
||||
va_list ap;
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ static void SV_RankEncodeGameID( uint64_t game_id, char* result,
|
|||
static uint64_t SV_RankDecodePlayerID( const char* string );
|
||||
static void SV_RankDecodePlayerKey( const char* string, GR_PLAYER_TOKEN key );
|
||||
static char* SV_RankStatusString( GR_STATUS status );
|
||||
static void SV_RankError( const char* fmt, ... ) __attribute__ ((format (printf, 1, 2)));
|
||||
static void SV_RankError( const char* fmt, ... ) Q_PRINTF_FUNC(1, 2);
|
||||
static char SV_RankGameKey[64];
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ send "\b \b"
|
|||
static void CON_Back( void )
|
||||
{
|
||||
char key;
|
||||
size_t UNUSED_VAR size;
|
||||
size_t Q_UNUSED_VAR size;
|
||||
|
||||
key = '\b';
|
||||
size = write(STDOUT_FILENO, &key, 1);
|
||||
|
|
@ -148,7 +148,7 @@ static void CON_Show( void )
|
|||
ttycon_hide--;
|
||||
if (ttycon_hide == 0)
|
||||
{
|
||||
size_t UNUSED_VAR size;
|
||||
size_t Q_UNUSED_VAR size;
|
||||
size = write(STDOUT_FILENO, TTY_CONSOLE_PROMPT, strlen(TTY_CONSOLE_PROMPT));
|
||||
if (TTY_con.cursor)
|
||||
{
|
||||
|
|
@ -337,7 +337,7 @@ char *CON_Input( void )
|
|||
int avail;
|
||||
char key;
|
||||
field_t *history;
|
||||
size_t UNUSED_VAR size;
|
||||
size_t Q_UNUSED_VAR size;
|
||||
|
||||
if(ttycon_on)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ void Sys_GLimpSafeInit( void );
|
|||
void Sys_GLimpInit( void );
|
||||
void Sys_PlatformInit( void );
|
||||
void Sys_PlatformExit( void );
|
||||
void Sys_SigHandler( int signal ) __attribute__ ((noreturn));
|
||||
void Sys_SigHandler( int signal ) Q_NO_RETURN;
|
||||
void Sys_ErrorDialog( const char *error );
|
||||
void Sys_AnsiColorPrint( const char *msg );
|
||||
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ Sys_Exit
|
|||
Single exit point (regular exit or in case of error)
|
||||
=================
|
||||
*/
|
||||
static __attribute__ ((noreturn)) void Sys_Exit( int exitCode )
|
||||
static Q_NO_RETURN void Sys_Exit( int exitCode )
|
||||
{
|
||||
CON_Shutdown( );
|
||||
|
||||
|
|
@ -453,7 +453,7 @@ void Sys_Error( const char *error, ... )
|
|||
Sys_Warn
|
||||
=================
|
||||
*/
|
||||
static __attribute__ ((format (printf, 1, 2))) void Sys_Warn( char *warning, ... )
|
||||
static Q_PRINTF_FUNC(1, 2) void Sys_Warn( char *warning, ... )
|
||||
{
|
||||
va_list argptr;
|
||||
char string[1024];
|
||||
|
|
|
|||
|
|
@ -918,7 +918,7 @@ void UI_SPSkillMenu_Cache( void );
|
|||
// ui_syscalls.c
|
||||
//
|
||||
void trap_Print( const char *string );
|
||||
void trap_Error(const char *string) __attribute__((noreturn));
|
||||
void trap_Error(const char *string) Q_NO_RETURN;
|
||||
int trap_Milliseconds( void );
|
||||
void trap_Cvar_Register( vmCvar_t *vmCvar, const char *varName, const char *defaultValue, int flags );
|
||||
void trap_Cvar_Update( vmCvar_t *vmCvar );
|
||||
|
|
|
|||
|
|
@ -255,7 +255,7 @@ void String_Init(void) {
|
|||
PC_SourceWarning
|
||||
=================
|
||||
*/
|
||||
static __attribute__ ((format (printf, 2, 3))) void PC_SourceWarning(int handle, char *format, ...) {
|
||||
static Q_PRINTF_FUNC(2, 3) void PC_SourceWarning(int handle, char *format, ...) {
|
||||
int line;
|
||||
char filename[128];
|
||||
va_list argptr;
|
||||
|
|
@ -278,7 +278,7 @@ static __attribute__ ((format (printf, 2, 3))) void PC_SourceWarning(int handle,
|
|||
PC_SourceError
|
||||
=================
|
||||
*/
|
||||
static __attribute__ ((format (printf, 2, 3))) void PC_SourceError(int handle, char *format, ...) {
|
||||
static Q_PRINTF_FUNC(2, 3) void PC_SourceError(int handle, char *format, ...) {
|
||||
int line;
|
||||
char filename[128];
|
||||
va_list argptr;
|
||||
|
|
|
|||
|
|
@ -355,8 +355,8 @@ typedef struct {
|
|||
void (*getBindingBuf)( int keynum, char *buf, int buflen );
|
||||
void (*setBinding)( int keynum, const char *binding );
|
||||
void (*executeText)(int exec_when, const char *text );
|
||||
void (*Error)(int level, const char *error, ...) __attribute__ ((noreturn, format (printf, 2, 3)));
|
||||
void (*Print)(const char *msg, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
void (*Error)(int level, const char *error, ...) Q_NO_RETURN Q_PRINTF_FUNC(2, 3);
|
||||
void (*Print)(const char *msg, ...) Q_PRINTF_FUNC(1, 2);
|
||||
void (*Pause)(qboolean b);
|
||||
int (*ownerDrawWidth)(int ownerDraw, float scale);
|
||||
sfxHandle_t (*registerSound)(const char *name, qboolean compressed);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user