mirror of
https://github.com/ioquake/jedi-academy.git
synced 2025-03-12 12:12:07 +00:00
strnicmp -> Q_strnicmp
This commit is contained in:
parent
901d5acb51
commit
5c941d29f1
6 changed files with 16 additions and 9 deletions
|
@ -702,7 +702,7 @@ static sboolean S_LoadSound_DirIsAllowedToKeepMP3s(const char *psFilename)
|
||||||
int i;
|
int i;
|
||||||
for (i=0; i< (sizeof(psAllowedDirs) / sizeof(psAllowedDirs[0])); i++)
|
for (i=0; i< (sizeof(psAllowedDirs) / sizeof(psAllowedDirs[0])); i++)
|
||||||
{
|
{
|
||||||
if (strnicmp(psFilename, psAllowedDirs[i], strlen(psAllowedDirs[i]))==0)
|
if (Q_strnicmp(psFilename, psAllowedDirs[i], strlen(psAllowedDirs[i]))==0)
|
||||||
return qtrue; // found a dir that's allowed to keep MP3s
|
return qtrue; // found a dir that's allowed to keep MP3s
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -765,7 +765,7 @@ static sboolean S_LoadSound_Actual( sfx_t *sfx )
|
||||||
SND_TouchSFX(sfx);
|
SND_TouchSFX(sfx);
|
||||||
|
|
||||||
//=========
|
//=========
|
||||||
if (strnicmp(psExt,".mp3",4)==0)
|
if (Q_strnicmp(psExt,".mp3",4)==0)
|
||||||
{
|
{
|
||||||
// load MP3 file instead...
|
// load MP3 file instead...
|
||||||
//
|
//
|
||||||
|
|
|
@ -1751,6 +1751,13 @@ char *Q_strlwr( char *s1 );
|
||||||
char *Q_strupr( char *s1 );
|
char *Q_strupr( char *s1 );
|
||||||
char *Q_strrchr( const char* string, int c );
|
char *Q_strrchr( const char* string, int c );
|
||||||
|
|
||||||
|
// NON-portable (but faster) versions
|
||||||
|
#ifdef _WIN32
|
||||||
|
inline int Q_strnicmp (const char *s1, const char *s2, int n) { return strnicmp(s1, s2, n); }
|
||||||
|
#else
|
||||||
|
inline int Q_strnicmp (const char *s1, const char *s2, int n) { return strncasecmp(s1, s2, n); }
|
||||||
|
#endif
|
||||||
|
|
||||||
// buffer size safe library replacements
|
// buffer size safe library replacements
|
||||||
void Q_strncpyz( char *dest, const char *src, int destsize );
|
void Q_strncpyz( char *dest, const char *src, int destsize );
|
||||||
void Q_strcat( char *dest, int size, const char *src );
|
void Q_strcat( char *dest, int size, const char *src );
|
||||||
|
|
|
@ -1038,7 +1038,7 @@ static bool Sys_FileOutOfDate( LPCSTR psFinalFileName /* dest */, LPCSTR psDataF
|
||||||
|
|
||||||
static bool FS_FileCacheable(const char* const filename)
|
static bool FS_FileCacheable(const char* const filename)
|
||||||
{
|
{
|
||||||
return( strchr(filename, '/') && strnicmp(filename, "ext_data/", 9) );
|
return( strchr(filename, '/') && Q_strnicmp(filename, "ext_data/", 9) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -10589,7 +10589,7 @@ static void UI_BuildPlayerModel_List( qboolean inGameLoad )
|
||||||
|
|
||||||
if (bIsImageFile(dirptr, skinname))
|
if (bIsImageFile(dirptr, skinname))
|
||||||
{ //if it exists
|
{ //if it exists
|
||||||
if (strnicmp(skinname,"head_",5) == 0)
|
if (Q_strnicmp(skinname,"head_",5) == 0)
|
||||||
{
|
{
|
||||||
if (uiInfo.playerSpecies[uiInfo.playerSpeciesCount].SkinHeadCount < MAX_PLAYERMODELS)
|
if (uiInfo.playerSpecies[uiInfo.playerSpeciesCount].SkinHeadCount < MAX_PLAYERMODELS)
|
||||||
{
|
{
|
||||||
|
@ -10601,7 +10601,7 @@ static void UI_BuildPlayerModel_List( qboolean inGameLoad )
|
||||||
iSkinParts |= 1<<0;
|
iSkinParts |= 1<<0;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
if (strnicmp(skinname,"torso_",6) == 0)
|
if (Q_strnicmp(skinname,"torso_",6) == 0)
|
||||||
{
|
{
|
||||||
if (uiInfo.playerSpecies[uiInfo.playerSpeciesCount].SkinTorsoCount < MAX_PLAYERMODELS)
|
if (uiInfo.playerSpecies[uiInfo.playerSpeciesCount].SkinTorsoCount < MAX_PLAYERMODELS)
|
||||||
{
|
{
|
||||||
|
@ -10612,7 +10612,7 @@ static void UI_BuildPlayerModel_List( qboolean inGameLoad )
|
||||||
iSkinParts |= 1<<1;
|
iSkinParts |= 1<<1;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
if (strnicmp(skinname,"lower_",6) == 0)
|
if (Q_strnicmp(skinname,"lower_",6) == 0)
|
||||||
{
|
{
|
||||||
if (uiInfo.playerSpecies[uiInfo.playerSpeciesCount].SkinLegCount < MAX_PLAYERMODELS)
|
if (uiInfo.playerSpecies[uiInfo.playerSpeciesCount].SkinLegCount < MAX_PLAYERMODELS)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1361,8 +1361,8 @@ static void GLW_InitExtensions( void )
|
||||||
|
|
||||||
// Figure out which texture rectangle extension to use.
|
// Figure out which texture rectangle extension to use.
|
||||||
bool bTexRectSupported = false;
|
bool bTexRectSupported = false;
|
||||||
if ( strnicmp( glConfig.vendor_string, "ATI Technologies",16 )==0
|
if ( Q_strnicmp( glConfig.vendor_string, "ATI Technologies",16 )==0
|
||||||
&& strnicmp( glConfig.version_string, "1.3.3",5 )==0
|
&& Q_strnicmp( glConfig.version_string, "1.3.3",5 )==0
|
||||||
&& glConfig.version_string[5] < '9' ) //1.3.34 and 1.3.37 and 1.3.38 are broken for sure, 1.3.39 is not
|
&& glConfig.version_string[5] < '9' ) //1.3.34 and 1.3.37 and 1.3.38 are broken for sure, 1.3.39 is not
|
||||||
{
|
{
|
||||||
g_bTextureRectangleHack = true;
|
g_bTextureRectangleHack = true;
|
||||||
|
|
|
@ -666,7 +666,7 @@ static qboolean Sys_ScanForCD( void ) {
|
||||||
Result = GetVolumeInformation(drive,VolumeName,sizeof(VolumeName),&VolumeSerialNumber,
|
Result = GetVolumeInformation(drive,VolumeName,sizeof(VolumeName),&VolumeSerialNumber,
|
||||||
&MaximumComponentLength,&FileSystemFlags,FileSystemName,sizeof(FileSystemName));
|
&MaximumComponentLength,&FileSystemFlags,FileSystemName,sizeof(FileSystemName));
|
||||||
|
|
||||||
if (Result && (strnicmp(VolumeName,CD_VOLUME,8) == 0 ) )
|
if (Result && (Q_strnicmp(VolumeName,CD_VOLUME,8) == 0 ) )
|
||||||
{
|
{
|
||||||
sprintf (test, "%s%s\\%s",drive, CD_BASEDIR, CD_EXE);
|
sprintf (test, "%s%s\\%s",drive, CD_BASEDIR, CD_EXE);
|
||||||
f = fopen( test, "r" );
|
f = fopen( test, "r" );
|
||||||
|
|
Loading…
Reference in a new issue