manage strstr() use
This commit is contained in:
parent
325a46a102
commit
1f59dac119
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user