diff options
| author | Ray <[email protected]> | 2017-03-29 00:35:42 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2017-03-29 00:35:42 +0200 |
| commit | 080a79f0b03bd40a4ac6dfb8c6f90a3a7379d7ad (patch) | |
| tree | 1bbd9d5d1ed6f1818f0497110f222f1ef5d7a67e /src/utils.c | |
| parent | 2f65975c5ec6d82d2321ed28d7754edf636da7ec (diff) | |
| download | raylib-080a79f0b03bd40a4ac6dfb8c6f90a3a7379d7ad.tar.gz raylib-080a79f0b03bd40a4ac6dfb8c6f90a3a7379d7ad.zip | |
Added IsFileExtension()
Replaced old GetExtension() function
Make IsFileExtension() public to the API
Diffstat (limited to 'src/utils.c')
| -rw-r--r-- | src/utils.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/utils.c b/src/utils.c index 6a07f301..649fda4f 100644 --- a/src/utils.c +++ b/src/utils.c @@ -88,14 +88,15 @@ static int android_close(void *cookie); //---------------------------------------------------------------------------------- // Module Functions Definition - Utilities //---------------------------------------------------------------------------------- -// Outputs a trace log message + +// Output trace log messages void TraceLog(int msgType, const char *text, ...) { -#if !defined(NO_TRACELOG) +#if defined(SUPPORT_TRACELOG) static char buffer[128]; int traceDebugMsgs = 1; -#ifdef DO_NOT_TRACE_DEBUG_MSGS +#if defined(SUPPORT_TRACELOG_DEBUG) traceDebugMsgs = 0; #endif @@ -131,7 +132,7 @@ void TraceLog(int msgType, const char *text, ...) if (msgType == ERROR) exit(1); // If ERROR message, exit program -#endif // NO_TRACELOG +#endif // SUPPORT_TRACELOG } #if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI) @@ -163,19 +164,6 @@ void RecordMalloc(int mallocType, int mallocSize, const char *msg) } */ -bool IsFileExtension(const char *fileName, const char *ext) -{ - return (strcmp(GetExtension(fileName), ext) == 0); -} - -// Get the extension for a filename -const char *GetExtension(const char *fileName) -{ - const char *dot = strrchr(fileName, '.'); - if (!dot || dot == fileName) return ""; - return (dot + 1); -} - #if defined(PLATFORM_ANDROID) // Initialize asset manager from android app void InitAssetManager(AAssetManager *manager) |
