From c7010884b63d0dc607cbe85461eba299dee1eff9 Mon Sep 17 00:00:00 2001 From: Garux Date: Fri, 24 Jan 2020 02:47:33 +0300 Subject: [PATCH] manage strlwr, strlower->strLower --- tools/quake3/common/aselib.c | 16 ---------------- tools/quake3/common/cmdlib.h | 2 +- tools/quake3/common/trilib.c | 12 +++--------- tools/quake3/q3data/q3data.c | 2 +- 4 files changed, 5 insertions(+), 27 deletions(-) diff --git a/tools/quake3/common/aselib.c b/tools/quake3/common/aselib.c index d39b75eb..8150fabf 100644 --- a/tools/quake3/common/aselib.c +++ b/tools/quake3/common/aselib.c @@ -114,22 +114,6 @@ static char gl_filename[1024]; static void ASE_Process( void ); static void ASE_FreeGeomObject( int ndx ); -#if defined ( __linux__ ) || defined ( __APPLE__ ) - -static char* strlwr( char* string ){ - char *cp; - for ( cp = string; *cp; ++cp ) - { - if ( 'A' <= *cp && *cp <= 'Z' ) { - *cp += 'a' - 'A'; - } - } - - return string; -} - -#endif - /* ** ASE_Load */ diff --git a/tools/quake3/common/cmdlib.h b/tools/quake3/common/cmdlib.h index f77dbcfe..499bff5a 100644 --- a/tools/quake3/common/cmdlib.h +++ b/tools/quake3/common/cmdlib.h @@ -86,7 +86,7 @@ static inline qboolean strEmpty( const char* string ){ static inline void strClear( char* string ){ *string = '\0'; } -static inline char *strlower( char *string ){ +static inline char *strLower( char *string ){ for( char *in = string; *in; ++in ) *in = tolower( *in ); return string; diff --git a/tools/quake3/common/trilib.c b/tools/quake3/common/trilib.c index e7a71d72..8b1826cc 100644 --- a/tools/quake3/common/trilib.c +++ b/tools/quake3/common/trilib.c @@ -36,12 +36,6 @@ #define FLOAT_END -FLOAT_START #define MAGIC 123322 -//#define NOISY 1 - -#if defined ( __linux__ ) || defined ( __APPLE__ ) -#define strlwr strlower -#endif - typedef struct { float v[3]; } vector; @@ -154,7 +148,7 @@ void TRI_LoadPolysets( const char *filename, polyset_t **ppPSET, int *numpsets ) else{ strcpy( pPSET[pset].name, "(unnamed)" ); } - strlwr( pPSET[pset].name ); + strLower( pPSET[pset].name ); // indent(); // fprintf( stdout, "OBJECT START: %s\n", name ); @@ -176,7 +170,7 @@ void TRI_LoadPolysets( const char *filename, polyset_t **ppPSET, int *numpsets ) strncpy( pPSET[pset].texname, tex, sizeof( pPSET[pset].texname ) - 1 ); else strcpy( pPSET[pset].texname, "(unnamed)" ); - strlwr( pPSET[pset].texname ); + strLower( pPSET[pset].texname ); */ // indent(); @@ -206,7 +200,7 @@ void TRI_LoadPolysets( const char *filename, polyset_t **ppPSET, int *numpsets ) strcpy( pPSET[pset].name, "(unnamed)" ); } - strlwr( pPSET[pset].name ); + strLower( pPSET[pset].name ); // indent(); // fprintf( stdout, "OBJECT END: %s\n", name ); diff --git a/tools/quake3/q3data/q3data.c b/tools/quake3/q3data/q3data.c index 9896d498..370546b6 100644 --- a/tools/quake3/q3data/q3data.c +++ b/tools/quake3/q3data/q3data.c @@ -160,7 +160,7 @@ void FindShaderFiles( char *filename ){ } linebuffer[i] = 0; - strlower( linebuffer ); + strLower( linebuffer ); // see if the line specifies an opaque map or blendmap if ( strstr( linebuffer, "opaquemap" ) == linebuffer ||