mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-09 05:41:46 +08:00
Fix missing const-qualifiers in engine code. Fix qboolean/int mixing in interface implementations(int is preferred). Replace long by int in COM_RandomLong.
This commit is contained in:
@@ -338,7 +338,7 @@ void Cmd_Alias_f( void )
|
||||
cmdalias_t *a;
|
||||
char cmd[MAX_CMD_LINE];
|
||||
int i, c;
|
||||
char *s;
|
||||
const char *s;
|
||||
|
||||
if( Cmd_Argc() == 1 )
|
||||
{
|
||||
@@ -465,7 +465,7 @@ static cmd_t *cmd_functions; // possible commands to execute
|
||||
Cmd_Argc
|
||||
============
|
||||
*/
|
||||
uint Cmd_Argc( void )
|
||||
int Cmd_Argc( void )
|
||||
{
|
||||
return cmd_argc;
|
||||
}
|
||||
@@ -475,7 +475,7 @@ uint Cmd_Argc( void )
|
||||
Cmd_Argv
|
||||
============
|
||||
*/
|
||||
char *Cmd_Argv( int arg )
|
||||
const char *Cmd_Argv( int arg )
|
||||
{
|
||||
if((uint)arg >= cmd_argc )
|
||||
return "";
|
||||
@@ -487,7 +487,7 @@ char *Cmd_Argv( int arg )
|
||||
Cmd_Args
|
||||
============
|
||||
*/
|
||||
char *Cmd_Args( void )
|
||||
const char *Cmd_Args( void )
|
||||
{
|
||||
return cmd_args;
|
||||
}
|
||||
@@ -1091,7 +1091,7 @@ void Cmd_List_f( void )
|
||||
{
|
||||
cmd_t *cmd;
|
||||
int i = 0;
|
||||
char *match;
|
||||
const char *match;
|
||||
|
||||
if( Cmd_Argc() > 1 ) match = Cmd_Argv( 1 );
|
||||
else match = NULL;
|
||||
|
||||
@@ -121,7 +121,7 @@ float COM_RandomFloat( float flLow, float flHigh )
|
||||
return (fl * (flHigh - flLow)) + flLow; // float in [low, high)
|
||||
}
|
||||
|
||||
long COM_RandomLong( long lLow, long lHigh )
|
||||
int COM_RandomLong( int lLow, int lHigh )
|
||||
{
|
||||
dword maxAcceptable;
|
||||
dword n, x = lHigh - lLow + 1;
|
||||
@@ -1009,7 +1009,7 @@ byte* COM_LoadFileForMe( const char *filename, int *pLength )
|
||||
{
|
||||
string name;
|
||||
byte *file, *pfile;
|
||||
int iLength;
|
||||
long iLength;
|
||||
|
||||
if( !COM_CheckString( filename ))
|
||||
{
|
||||
@@ -1022,7 +1022,7 @@ byte* COM_LoadFileForMe( const char *filename, int *pLength )
|
||||
COM_FixSlashes( name );
|
||||
|
||||
pfile = FS_LoadFile( name, &iLength, false );
|
||||
if( pLength ) *pLength = iLength;
|
||||
if( pLength ) *pLength = (int)iLength;
|
||||
|
||||
if( pfile )
|
||||
{
|
||||
|
||||
@@ -544,7 +544,7 @@ long FS_FileSize( const char *filename, qboolean gamedironly );
|
||||
long FS_FileTime( const char *filename, qboolean gamedironly );
|
||||
int FS_Print( file_t *file, const char *msg );
|
||||
qboolean FS_Rename( const char *oldname, const char *newname );
|
||||
qboolean FS_FileExists( const char *filename, qboolean gamedironly );
|
||||
int FS_FileExists( const char *filename, int gamedironly );
|
||||
qboolean FS_SysFileExists( const char *path, qboolean casesensitive );
|
||||
qboolean FS_FileCopy( file_t *pOutput, file_t *pInput, int fileSize );
|
||||
qboolean FS_Delete( const char *path );
|
||||
@@ -822,7 +822,7 @@ void CL_Init( void );
|
||||
void CL_Shutdown( void );
|
||||
void Host_ClientBegin( void );
|
||||
void Host_ClientFrame( void );
|
||||
qboolean CL_Active( void );
|
||||
int CL_Active( void );
|
||||
|
||||
void SV_Init( void );
|
||||
void SV_Shutdown( const char *finalmsg );
|
||||
@@ -859,9 +859,9 @@ void pfnGetGameDir( char *szGetGameDir );
|
||||
int pfnDecalIndex( const char *m );
|
||||
int pfnGetModelType( model_t *mod );
|
||||
int pfnIsMapValid( char *filename );
|
||||
void Con_Reportf( char *szFmt, ... ) _format( 1 );
|
||||
void Con_DPrintf( char *fmt, ... ) _format( 1 );
|
||||
void Con_Printf( char *szFmt, ... ) _format( 1 );
|
||||
void Con_Reportf( const char *szFmt, ... ) _format( 1 );
|
||||
void Con_DPrintf( const char *fmt, ... ) _format( 1 );
|
||||
void Con_Printf( const char *szFmt, ... ) _format( 1 );
|
||||
int pfnNumberOfEntities( void );
|
||||
int pfnIsInGame( void );
|
||||
float pfnTime( void );
|
||||
@@ -935,9 +935,9 @@ void HPAK_FlushHostQueue( void );
|
||||
//
|
||||
// keys.c
|
||||
//
|
||||
qboolean Key_IsDown( int keynum );
|
||||
int Key_IsDown( int keynum );
|
||||
const char *Key_IsBind( int keynum );
|
||||
void Key_Event( int key, qboolean down );
|
||||
void Key_Event( int key, int down );
|
||||
void Key_Init( void );
|
||||
void Key_WriteBindings( file_t *f );
|
||||
const char *Key_GetBinding( int keynum );
|
||||
@@ -968,7 +968,7 @@ qboolean CL_DisableVisibility( void );
|
||||
int CL_PointContents( const vec3_t point );
|
||||
char *COM_ParseFile( char *data, char *token );
|
||||
byte *COM_LoadFile( const char *filename, int usehunk, int *pLength );
|
||||
qboolean CL_GetDemoComment( const char *demoname, char *comment );
|
||||
int CL_GetDemoComment( const char *demoname, char *comment );
|
||||
void COM_AddAppDirectoryToSearchPath( const char *pszBaseDir, const char *appName );
|
||||
int COM_ExpandFilename( const char *fileName, char *nameOutBuffer, int nameOutBufferSize );
|
||||
struct cmd_s *Cmd_GetFirstFunctionHandle( void );
|
||||
@@ -1008,7 +1008,7 @@ qboolean CL_IsBackgroundDemo( void );
|
||||
qboolean CL_IsBackgroundMap( void );
|
||||
qboolean SV_Initialized( void );
|
||||
qboolean CL_LoadProgs( const char *name );
|
||||
qboolean SV_GetSaveComment( const char *savename, char *comment );
|
||||
int SV_GetSaveComment( const char *savename, char *comment );
|
||||
qboolean SV_NewGame( const char *mapName, qboolean loadGame );
|
||||
void SV_ClipPMoveToEntity( physent_t *pe, const vec3_t start, vec3_t mins, vec3_t maxs, const vec3_t end, struct pmtrace_s *tr );
|
||||
void CL_ClipPMoveToEntity( physent_t *pe, const vec3_t start, vec3_t mins, vec3_t maxs, const vec3_t end, struct pmtrace_s *tr );
|
||||
@@ -1037,11 +1037,11 @@ long SCR_GetAudioChunk( char *rawdata, long length );
|
||||
wavdata_t *SCR_GetMovieInfo( void );
|
||||
void SCR_Shutdown( void );
|
||||
void Con_Print( const char *txt );
|
||||
void Con_NPrintf( int idx, char *fmt, ... ) _format( 2 );
|
||||
void Con_NXPrintf( con_nprint_t *info, char *fmt, ... ) _format( 2 );
|
||||
void UI_NPrintf( int idx, char *fmt, ... ) _format( 2 );
|
||||
void UI_NXPrintf( con_nprint_t *info, char *fmt, ... ) _format( 2 );
|
||||
char *Info_ValueForKey( const char *s, const char *key );
|
||||
void Con_NPrintf( int idx, const char *fmt, ... ) _format( 2 );
|
||||
void Con_NXPrintf( con_nprint_t *info, const char *fmt, ... ) _format( 2 );
|
||||
void UI_NPrintf( int idx, const char *fmt, ... ) _format( 2 );
|
||||
void UI_NXPrintf( con_nprint_t *info, const char *fmt, ... ) _format( 2 );
|
||||
const char *Info_ValueForKey( const char *s, const char *key );
|
||||
void Info_RemovePrefixedKeys( char *start, char prefix );
|
||||
qboolean Info_RemoveKey( char *s, const char *key );
|
||||
qboolean Info_SetValueForKey( char *s, const char *key, const char *value, int maxsize );
|
||||
@@ -1050,11 +1050,11 @@ qboolean Info_IsValid( const char *s );
|
||||
void Info_WriteVars( file_t *f );
|
||||
void Info_Print( const char *s );
|
||||
void Cmd_WriteVariables( file_t *f );
|
||||
qboolean Cmd_CheckMapsList( qboolean fRefresh );
|
||||
int Cmd_CheckMapsList( int fRefresh );
|
||||
qboolean Cmd_AutocompleteName( const char *source, char *buffer, size_t bufsize );
|
||||
void Cmd_AutoComplete( char *complete_string );
|
||||
void COM_SetRandomSeed( long lSeed );
|
||||
long COM_RandomLong( long lMin, long lMax );
|
||||
int COM_RandomLong( int lMin, int lMax );
|
||||
float COM_RandomFloat( float fMin, float fMax );
|
||||
qboolean LZSS_IsCompressed( const byte *source );
|
||||
uint LZSS_GetActualSize( const byte *source );
|
||||
|
||||
@@ -802,7 +802,7 @@ qboolean Cmd_CheckMapsList_R( qboolean fRefresh, qboolean onlyingamedir )
|
||||
return false;
|
||||
}
|
||||
|
||||
qboolean Cmd_CheckMapsList( qboolean fRefresh )
|
||||
int Cmd_CheckMapsList( int fRefresh )
|
||||
{
|
||||
return Cmd_CheckMapsList_R( fRefresh, true );
|
||||
}
|
||||
|
||||
@@ -601,4 +601,4 @@ uint COM_HashKey( const char *string, uint hashSize )
|
||||
hashKey = (hashKey + i) * 37 + Q_tolower( string[i] );
|
||||
|
||||
return (hashKey % hashSize);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,9 +48,9 @@ void Cbuf_AddText( const char *text );
|
||||
void Cbuf_InsertText( const char *text );
|
||||
void Cbuf_ExecStuffCmds( void );
|
||||
void Cbuf_Execute (void);
|
||||
uint Cmd_Argc( void );
|
||||
char *Cmd_Args( void );
|
||||
char *Cmd_Argv( int arg );
|
||||
int Cmd_Argc( void );
|
||||
const char *Cmd_Args( void );
|
||||
const char *Cmd_Argv( int arg );
|
||||
void Cmd_Init( void );
|
||||
void Cmd_Unlink( int group );
|
||||
void Cmd_AddCommand( const char *cmd_name, xcommand_t function, const char *cmd_desc );
|
||||
|
||||
@@ -63,7 +63,7 @@ void COM_ClearCustomizationList( customization_t *pHead, qboolean bCleanDecals )
|
||||
qboolean COM_CreateCustomization( customization_t *pListHead, resource_t *pResource, int playernumber, int flags, customization_t **pOut, int *nLumps )
|
||||
{
|
||||
qboolean bError = false;
|
||||
int checksize = 0;
|
||||
long checksize = 0;
|
||||
customization_t *pCust;
|
||||
|
||||
if( pOut ) *pOut = NULL;
|
||||
@@ -85,7 +85,7 @@ qboolean COM_CreateCustomization( customization_t *pListHead, resource_t *pResou
|
||||
{
|
||||
|
||||
pCust->pBuffer = FS_LoadFile( pResource->szFileName, &checksize, true );
|
||||
if( checksize != pCust->resource.nDownloadSize )
|
||||
if( (int)checksize != pCust->resource.nDownloadSize )
|
||||
bError = true;
|
||||
}
|
||||
|
||||
@@ -149,4 +149,4 @@ int COM_SizeofResourceList( resource_t *pList, resourceinfo_t *ri )
|
||||
}
|
||||
|
||||
return nSize;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -647,7 +647,7 @@ int Cvar_VariableInteger( const char *var_name )
|
||||
Cvar_VariableString
|
||||
============
|
||||
*/
|
||||
char *Cvar_VariableString( const char *var_name )
|
||||
const char *Cvar_VariableString( const char *var_name )
|
||||
{
|
||||
convar_t *var;
|
||||
|
||||
@@ -818,7 +818,7 @@ Cvar_List_f
|
||||
void Cvar_List_f( void )
|
||||
{
|
||||
convar_t *var;
|
||||
char *match = NULL;
|
||||
const char *match = NULL;
|
||||
char *value;
|
||||
int count = 0;
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ void Cvar_SetValue( const char *var_name, float value );
|
||||
const char *Cvar_BuildAutoDescription( int flags );
|
||||
float Cvar_VariableValue( const char *var_name );
|
||||
int Cvar_VariableInteger( const char *var_name );
|
||||
char *Cvar_VariableString( const char *var_name );
|
||||
const char *Cvar_VariableString( const char *var_name );
|
||||
void Cvar_WriteVariables( file_t *f, int group );
|
||||
void Cvar_Reset( const char *var_name );
|
||||
void Cvar_SetCheatState( void );
|
||||
|
||||
@@ -2415,7 +2415,7 @@ FS_FileExists
|
||||
Look for a file in the packages and in the filesystem
|
||||
==================
|
||||
*/
|
||||
qboolean FS_FileExists( const char *filename, qboolean gamedironly )
|
||||
int FS_FileExists( const char *filename, int gamedironly )
|
||||
{
|
||||
if( FS_FindFile( filename, NULL, gamedironly ))
|
||||
return true;
|
||||
|
||||
@@ -188,7 +188,7 @@ Searches the string for the given
|
||||
key and returns the associated value, or an empty string.
|
||||
===============
|
||||
*/
|
||||
char *Info_ValueForKey( const char *s, const char *key )
|
||||
const char *Info_ValueForKey( const char *s, const char *key )
|
||||
{
|
||||
char pkey[MAX_KV_SIZE];
|
||||
static char value[4][MAX_KV_SIZE]; // use two buffers so compares work without stomping on each other
|
||||
@@ -499,4 +499,4 @@ qboolean Info_SetValueForKey( char *s, const char *key, const char *value, int m
|
||||
}
|
||||
|
||||
return Info_SetValueForStarKey( s, key, value, maxsize );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,28 +181,28 @@ static model_t *worldmodel;
|
||||
static mlumpstat_t worldstats[HEADER_LUMPS+EXTRA_LUMPS];
|
||||
static mlumpinfo_t srclumps[HEADER_LUMPS] =
|
||||
{
|
||||
{ LUMP_ENTITIES, 32, MAX_MAP_ENTSTRING, sizeof( byte ), -1, "entities", 0, (void **)&srcmodel.entdata, &srcmodel.entdatasize },
|
||||
{ LUMP_PLANES, 1, MAX_MAP_PLANES, sizeof( dplane_t ), -1, "planes", 0, (void **)&srcmodel.planes, &srcmodel.numplanes },
|
||||
{ LUMP_TEXTURES, 1, MAX_MAP_MIPTEX, sizeof( byte ), -1, "textures", 0, (void **)&srcmodel.textures, &srcmodel.texdatasize },
|
||||
{ LUMP_VERTEXES, 0, MAX_MAP_VERTS, sizeof( dvertex_t ), -1, "vertexes", 0, (void **)&srcmodel.vertexes, &srcmodel.numvertexes },
|
||||
{ LUMP_VISIBILITY, 0, MAX_MAP_VISIBILITY, sizeof( byte ), -1, "visibility", 0, (void **)&srcmodel.visdata, &srcmodel.visdatasize },
|
||||
{ LUMP_NODES, 1, MAX_MAP_NODES, sizeof( dnode_t ), sizeof( dnode32_t ), "nodes", CHECK_OVERFLOW, (void **)&srcmodel.nodes, &srcmodel.numnodes },
|
||||
{ LUMP_TEXINFO, 0, MAX_MAP_TEXINFO, sizeof( dtexinfo_t ), -1, "texinfo", CHECK_OVERFLOW, (void **)&srcmodel.texinfo, &srcmodel.numtexinfo },
|
||||
{ LUMP_FACES, 0, MAX_MAP_FACES, sizeof( dface_t ), sizeof( dface32_t ), "faces", CHECK_OVERFLOW, (void **)&srcmodel.surfaces, &srcmodel.numsurfaces },
|
||||
{ LUMP_LIGHTING, 0, MAX_MAP_LIGHTING, sizeof( byte ), -1, "lightmaps", 0, (void **)&srcmodel.lightdata, &srcmodel.lightdatasize },
|
||||
{ LUMP_CLIPNODES, 0, MAX_MAP_CLIPNODES, sizeof( dclipnode_t ), sizeof( dclipnode32_t ), "clipnodes", 0, (void **)&srcmodel.clipnodes, &srcmodel.numclipnodes },
|
||||
{ LUMP_LEAFS, 1, MAX_MAP_LEAFS, sizeof( dleaf_t ), sizeof( dleaf32_t ), "leafs", CHECK_OVERFLOW, (void **)&srcmodel.leafs, &srcmodel.numleafs },
|
||||
{ LUMP_MARKSURFACES, 0, MAX_MAP_MARKSURFACES, sizeof( dmarkface_t ), sizeof( dmarkface32_t ), "markfaces", 0, (void **)&srcmodel.markfaces, &srcmodel.nummarkfaces },
|
||||
{ LUMP_EDGES, 0, MAX_MAP_EDGES, sizeof( dedge_t ), sizeof( dedge32_t ), "edges", 0, (void **)&srcmodel.edges, &srcmodel.numedges },
|
||||
{ LUMP_SURFEDGES, 0, MAX_MAP_SURFEDGES, sizeof( dsurfedge_t ), -1, "surfedges", 0, (void **)&srcmodel.surfedges, &srcmodel.numsurfedges },
|
||||
{ LUMP_MODELS, 1, MAX_MAP_MODELS, sizeof( dmodel_t ), -1, "models", CHECK_OVERFLOW, (void **)&srcmodel.submodels, &srcmodel.numsubmodels },
|
||||
{ LUMP_ENTITIES, 32, MAX_MAP_ENTSTRING, sizeof( byte ), -1, "entities", 0, (const void **)&srcmodel.entdata, &srcmodel.entdatasize },
|
||||
{ LUMP_PLANES, 1, MAX_MAP_PLANES, sizeof( dplane_t ), -1, "planes", 0, (const void **)&srcmodel.planes, &srcmodel.numplanes },
|
||||
{ LUMP_TEXTURES, 1, MAX_MAP_MIPTEX, sizeof( byte ), -1, "textures", 0, (const void **)&srcmodel.textures, &srcmodel.texdatasize },
|
||||
{ LUMP_VERTEXES, 0, MAX_MAP_VERTS, sizeof( dvertex_t ), -1, "vertexes", 0, (const void **)&srcmodel.vertexes, &srcmodel.numvertexes },
|
||||
{ LUMP_VISIBILITY, 0, MAX_MAP_VISIBILITY, sizeof( byte ), -1, "visibility", 0, (const void **)&srcmodel.visdata, &srcmodel.visdatasize },
|
||||
{ LUMP_NODES, 1, MAX_MAP_NODES, sizeof( dnode_t ), sizeof( dnode32_t ), "nodes", CHECK_OVERFLOW, (const void **)&srcmodel.nodes, &srcmodel.numnodes },
|
||||
{ LUMP_TEXINFO, 0, MAX_MAP_TEXINFO, sizeof( dtexinfo_t ), -1, "texinfo", CHECK_OVERFLOW, (const void **)&srcmodel.texinfo, &srcmodel.numtexinfo },
|
||||
{ LUMP_FACES, 0, MAX_MAP_FACES, sizeof( dface_t ), sizeof( dface32_t ), "faces", CHECK_OVERFLOW, (const void **)&srcmodel.surfaces, &srcmodel.numsurfaces },
|
||||
{ LUMP_LIGHTING, 0, MAX_MAP_LIGHTING, sizeof( byte ), -1, "lightmaps", 0, (const void **)&srcmodel.lightdata, &srcmodel.lightdatasize },
|
||||
{ LUMP_CLIPNODES, 0, MAX_MAP_CLIPNODES, sizeof( dclipnode_t ), sizeof( dclipnode32_t ), "clipnodes", 0, (const void **)&srcmodel.clipnodes, &srcmodel.numclipnodes },
|
||||
{ LUMP_LEAFS, 1, MAX_MAP_LEAFS, sizeof( dleaf_t ), sizeof( dleaf32_t ), "leafs", CHECK_OVERFLOW, (const void **)&srcmodel.leafs, &srcmodel.numleafs },
|
||||
{ LUMP_MARKSURFACES, 0, MAX_MAP_MARKSURFACES, sizeof( dmarkface_t ), sizeof( dmarkface32_t ), "markfaces", 0, (const void **)&srcmodel.markfaces, &srcmodel.nummarkfaces },
|
||||
{ LUMP_EDGES, 0, MAX_MAP_EDGES, sizeof( dedge_t ), sizeof( dedge32_t ), "edges", 0, (const void **)&srcmodel.edges, &srcmodel.numedges },
|
||||
{ LUMP_SURFEDGES, 0, MAX_MAP_SURFEDGES, sizeof( dsurfedge_t ), -1, "surfedges", 0, (const void **)&srcmodel.surfedges, &srcmodel.numsurfedges },
|
||||
{ LUMP_MODELS, 1, MAX_MAP_MODELS, sizeof( dmodel_t ), -1, "models", CHECK_OVERFLOW, (const void **)&srcmodel.submodels, &srcmodel.numsubmodels },
|
||||
};
|
||||
|
||||
static mlumpinfo_t extlumps[EXTRA_LUMPS] =
|
||||
{
|
||||
{ LUMP_LIGHTVECS, 0, MAX_MAP_LIGHTING, sizeof( byte ), -1, "deluxmaps", USE_EXTRAHEADER, (void **)&srcmodel.deluxdata, &srcmodel.deluxdatasize },
|
||||
{ LUMP_FACEINFO, 0, MAX_MAP_FACEINFO, sizeof( dfaceinfo_t ), -1, "faceinfos", CHECK_OVERFLOW|USE_EXTRAHEADER, (void **)&srcmodel.faceinfo, &srcmodel.numfaceinfo },
|
||||
{ LUMP_SHADOWMAP, 0, MAX_MAP_LIGHTING / 3, sizeof( byte ), -1, "shadowmap", USE_EXTRAHEADER, (void **)&srcmodel.shadowdata, &srcmodel.shadowdatasize },
|
||||
{ LUMP_LIGHTVECS, 0, MAX_MAP_LIGHTING, sizeof( byte ), -1, "deluxmaps", USE_EXTRAHEADER, (const void **)&srcmodel.deluxdata, &srcmodel.deluxdatasize },
|
||||
{ LUMP_FACEINFO, 0, MAX_MAP_FACEINFO, sizeof( dfaceinfo_t ), -1, "faceinfos", CHECK_OVERFLOW|USE_EXTRAHEADER, (const void **)&srcmodel.faceinfo, &srcmodel.numfaceinfo },
|
||||
{ LUMP_SHADOWMAP, 0, MAX_MAP_LIGHTING / 3, sizeof( byte ), -1, "shadowmap", USE_EXTRAHEADER, (const void **)&srcmodel.shadowdata, &srcmodel.shadowdatasize },
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -726,7 +726,7 @@ Netchan_CreateFileFragmentsFromBuffer
|
||||
|
||||
==============================
|
||||
*/
|
||||
void Netchan_CreateFileFragmentsFromBuffer( netchan_t *chan, char *filename, byte *pbuf, int size )
|
||||
void Netchan_CreateFileFragmentsFromBuffer( netchan_t *chan, const char *filename, byte *pbuf, int size )
|
||||
{
|
||||
int chunksize;
|
||||
int send, pos;
|
||||
@@ -1747,4 +1747,4 @@ qboolean Netchan_Process( netchan_t *chan, sizebuf_t *msg )
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1708,7 +1708,7 @@ void NET_GetLocalAddress( void )
|
||||
{
|
||||
net_local.port = address.sin_port;
|
||||
Con_Printf( "Server IP address %s\n", NET_AdrToString( net_local ));
|
||||
Cvar_FullSet( "net_address", va( NET_AdrToString( net_local )), FCVAR_READ_ONLY );
|
||||
Cvar_FullSet( "net_address", va( "%s", NET_AdrToString( net_local )), FCVAR_READ_ONLY );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -214,7 +214,7 @@ extern int net_drop;
|
||||
void Netchan_Init( void );
|
||||
void Netchan_Shutdown( void );
|
||||
void Netchan_Setup( netsrc_t sock, netchan_t *chan, netadr_t adr, int qport, void *client, int (*pfnBlockSize)(void * ) );
|
||||
void Netchan_CreateFileFragmentsFromBuffer( netchan_t *chan, char *filename, byte *pbuf, int size );
|
||||
void Netchan_CreateFileFragmentsFromBuffer( netchan_t *chan, const char *filename, byte *pbuf, int size );
|
||||
qboolean Netchan_CopyNormalFragments( netchan_t *chan, sizebuf_t *msg, size_t *length );
|
||||
qboolean Netchan_CopyFileFragments( netchan_t *chan, sizebuf_t *msg );
|
||||
void Netchan_CreateFragments( netchan_t *chan, sizebuf_t *msg );
|
||||
|
||||
@@ -77,7 +77,7 @@ typedef struct stream_s
|
||||
char temp[OUTBUF_SIZE]; // mpeg decoder stuff
|
||||
size_t pos; // actual track position (or actual buffer remains)
|
||||
int buffsize; // cached buffer size
|
||||
};
|
||||
} stream_t;
|
||||
|
||||
/*
|
||||
========================================================================
|
||||
@@ -134,4 +134,4 @@ long Stream_SetPosMPG( stream_t *stream, long newpos );
|
||||
long Stream_GetPosMPG( stream_t *stream );
|
||||
void Stream_FreeMPG( stream_t *stream );
|
||||
|
||||
#endif//SOUNDLIB_H
|
||||
#endif//SOUNDLIB_H
|
||||
|
||||
@@ -237,7 +237,7 @@ Con_Printf
|
||||
|
||||
=============
|
||||
*/
|
||||
void Con_Printf( char *szFmt, ... )
|
||||
void Con_Printf( const char *szFmt, ... )
|
||||
{
|
||||
static char buffer[MAX_PRINT_MSG];
|
||||
va_list args;
|
||||
@@ -258,7 +258,7 @@ Con_DPrintf
|
||||
|
||||
=============
|
||||
*/
|
||||
void Con_DPrintf( char *szFmt, ... )
|
||||
void Con_DPrintf( const char *szFmt, ... )
|
||||
{
|
||||
static char buffer[MAX_PRINT_MSG];
|
||||
va_list args;
|
||||
@@ -282,7 +282,7 @@ Con_Reportf
|
||||
|
||||
=============
|
||||
*/
|
||||
void Con_Reportf( char *szFmt, ... )
|
||||
void Con_Reportf( const char *szFmt, ... )
|
||||
{
|
||||
static char buffer[MAX_PRINT_MSG];
|
||||
va_list args;
|
||||
|
||||
@@ -287,7 +287,7 @@ static qboolean Sys_FindExecutable( const char *baseName, char *buf, size_t size
|
||||
Sys_ShellExecute
|
||||
=================
|
||||
*/
|
||||
void Sys_ShellExecute( const char *path, const char *parms, qboolean shouldExit )
|
||||
void Sys_ShellExecute( const char *path, const char *parms, int shouldExit )
|
||||
{
|
||||
#ifdef _WIN32
|
||||
if( !Q_strcmp( path, GENERIC_UPDATE_PAGE ) || !Q_strcmp( path, PLATFORM_UPDATE_PAGE ))
|
||||
|
||||
@@ -95,7 +95,7 @@ void Sys_SetClipboardData( const byte *buffer, size_t size );
|
||||
#define Sys_GetParmFromCmdLine( parm, out ) _Sys_GetParmFromCmdLine( parm, out, sizeof( out ))
|
||||
qboolean _Sys_GetParmFromCmdLine( const char *parm, char *out, size_t size );
|
||||
qboolean Sys_GetIntFromCmdLine( const char *parm, int *out );
|
||||
void Sys_ShellExecute( const char *path, const char *parms, qboolean exit );
|
||||
void Sys_ShellExecute( const char *path, const char *parms, int exit );
|
||||
void Sys_SendKeyEvents( void );
|
||||
void Sys_Print( const char *pMsg );
|
||||
void Sys_PrintLog( const char *pMsg );
|
||||
|
||||
@@ -166,7 +166,7 @@ static const char *Mem_CheckFilename( const char *filename )
|
||||
|
||||
if( !out ) return dummy;
|
||||
for( i = 0; i < 128; i++, out++ )
|
||||
if( out == '\0' ) break; // valid name
|
||||
if( *out == '\0' ) break; // valid name
|
||||
if( i == 128 ) return dummy;
|
||||
return filename;
|
||||
}
|
||||
@@ -483,4 +483,4 @@ Memory_Init
|
||||
void Memory_Init( void )
|
||||
{
|
||||
poolchain = NULL; // init mem chain
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user