diff --git a/tools/quake3/common/cmdlib.c b/tools/quake3/common/cmdlib.c index c63cec57..f6733474 100644 --- a/tools/quake3/common/cmdlib.c +++ b/tools/quake3/common/cmdlib.c @@ -106,7 +106,7 @@ void ExpandWildcards( int *argc, char ***argv ){ { path = ( *argv )[i]; if ( path[0] == '-' - || ( !strstr( path, "*" ) && !strstr( path, "?" ) ) ) { + || ( !strchr( path, '*' ) && !strchr( path, '?' ) ) ) { ex_argv[ex_argc++] = path; continue; } diff --git a/tools/quake3/q3data/oldstuff.c b/tools/quake3/q3data/oldstuff.c index 00cd5742..3ae9677c 100644 --- a/tools/quake3/q3data/oldstuff.c +++ b/tools/quake3/q3data/oldstuff.c @@ -110,7 +110,7 @@ const char *FindFrameFile( const char *frame ){ char suffix[32]; const char *s; - if ( strstr( frame, "." ) ) { + if ( strchr( frame, '.' ) ) { return frame; // allready in dot format } diff --git a/tools/quake3/q3data/polyset.c b/tools/quake3/q3data/polyset.c index 3b6433b7..ee272bc9 100644 --- a/tools/quake3/q3data/polyset.c +++ b/tools/quake3/q3data/polyset.c @@ -84,7 +84,7 @@ polyset_t *Polyset_LoadSets( const char *file, int *numpolysets, int maxTrisPerS // // load the frame // - if ( strstr( file, ".3DS" ) || strstr( file, ".3ds" ) ) { + if ( striEqual( path_get_filename_base_end( file ), ".3ds" ) ) { _3DS_LoadPolysets( file, &psets, numpolysets, g_verbose ); } else{ diff --git a/tools/quake3/q3data/q3data.c b/tools/quake3/q3data/q3data.c index d788b646..1a6d87b0 100644 --- a/tools/quake3/q3data/q3data.c +++ b/tools/quake3/q3data/q3data.c @@ -577,7 +577,7 @@ int main( int argc, char **argv ){ } else if ( !strcmp( argv[i], "-dump" ) ) { printf( "Dumping contents of: '%s'\n", argv[i + 1] ); - if ( strstr( argv[i + 1], ".md3" ) ) { + if ( striEqual( path_get_filename_base_end( argv[i + 1] ), ".md3" ) ) { MD3_Dump( argv[i + 1] ); } else diff --git a/tools/quake3/q3map2/map.c b/tools/quake3/q3map2/map.c index 43cc7cc7..cbd3f50e 100644 --- a/tools/quake3/q3map2/map.c +++ b/tools/quake3/q3map2/map.c @@ -1661,7 +1661,7 @@ void LoadEntityIndexMap( entity_t *e ){ /* get each value */ for ( i = 0; i < 256 && !strEmpty( search ); i++ ) { - space = strstr( search, " " ); + space = strchr( search, ' ' ); if ( space != NULL ) { strClear( space ); } diff --git a/tools/quake3/q3map2/shaders.c b/tools/quake3/q3map2/shaders.c index 0a01f2b2..6150e9f2 100644 --- a/tools/quake3/q3map2/shaders.c +++ b/tools/quake3/q3map2/shaders.c @@ -524,7 +524,7 @@ shaderInfo_t *CustomShader( shaderInfo_t *si, char *find, char *replace ){ } /* do some bad find-replace */ - s = strstr( srcShaderText, find ); + s = strIstr( srcShaderText, find ); if ( s == NULL ) { //% strcpy( shaderText, srcShaderText ); return si; /* testing just using the existing shader if this fails */ @@ -998,7 +998,7 @@ static void ParseShaderFile( const char *filename ){ strcpy( si->shader, token ); /* ignore ":q3map" suffix */ - suffix = strstr( si->shader, ":q3map" ); + suffix = strIstr( si->shader, ":q3map" ); if ( suffix != NULL ) { strClear( suffix ); }