mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-22 09:56:22 +01:00
public: crtlib: remove unused functions
This commit is contained in:
parent
01e0542223
commit
37e3cf7e86
@ -23,20 +23,6 @@ GNU General Public License for more details.
|
||||
#include "crtlib.h"
|
||||
#include "xash3d_mathlib.h"
|
||||
|
||||
void Q_strnupr( const char *in, char *out, size_t size_out )
|
||||
{
|
||||
if( size_out == 0 ) return;
|
||||
|
||||
while( *in && size_out > 1 )
|
||||
{
|
||||
if( *in >= 'a' && *in <= 'z' )
|
||||
*out++ = *in++ + 'A' - 'a';
|
||||
else *out++ = *in++;
|
||||
size_out--;
|
||||
}
|
||||
*out = '\0';
|
||||
}
|
||||
|
||||
void Q_strnlwr( const char *in, char *out, size_t size_out )
|
||||
{
|
||||
if( size_out == 0 ) return;
|
||||
@ -527,26 +513,6 @@ void COM_StripColors( const char *in, char *out )
|
||||
*out = '\0';
|
||||
}
|
||||
|
||||
uint Q_hashkey( const char *string, uint hashSize, qboolean caseinsensitive )
|
||||
{
|
||||
uint i, hashKey = 0;
|
||||
|
||||
if( caseinsensitive )
|
||||
{
|
||||
for( i = 0; string[i]; i++)
|
||||
hashKey += (i * 119) * Q_tolower( string[i] );
|
||||
}
|
||||
else
|
||||
{
|
||||
for( i = 0; string[i]; i++ )
|
||||
hashKey += (i + 119) * (int)string[i];
|
||||
}
|
||||
|
||||
hashKey = ((hashKey ^ (hashKey >> 10)) ^ (hashKey >> 20)) & (hashSize - 1);
|
||||
|
||||
return hashKey;
|
||||
}
|
||||
|
||||
char *Q_pretifymem( float value, int digitsafterdecimal )
|
||||
{
|
||||
static char output[8][32];
|
||||
|
@ -58,8 +58,6 @@ const char *Q_buildcommit( void );
|
||||
//
|
||||
// crtlib.c
|
||||
//
|
||||
#define Q_strupr( in, out ) Q_strnupr( in, out, 99999 )
|
||||
void Q_strnupr( const char *in, char *out, size_t size_out );
|
||||
#define Q_strlwr( in, out ) Q_strnlwr( in, out, 99999 )
|
||||
void Q_strnlwr( const char *in, char *out, size_t size_out );
|
||||
#define Q_strlen( str ) (( str ) ? strlen(( str )) : 0 )
|
||||
@ -70,7 +68,6 @@ char Q_tolower( const char in );
|
||||
size_t Q_strncat( char *dst, const char *src, size_t siz );
|
||||
#define Q_strcpy( dst, src ) Q_strncpy( dst, src, 99999 )
|
||||
size_t Q_strncpy( char *dst, const char *src, size_t siz );
|
||||
uint Q_hashkey( const char *string, uint hashSize, qboolean caseinsensitive );
|
||||
qboolean Q_isdigit( const char *str );
|
||||
qboolean Q_isspace( const char *str );
|
||||
int Q_atoi( const char *str );
|
||||
|
Loading…
Reference in New Issue
Block a user