summaryrefslogtreecommitdiffhomepage
path: root/src/utils.c
diff options
context:
space:
mode:
authorRay <[email protected]>2017-04-04 12:17:08 +0200
committerGitHub <[email protected]>2017-04-04 12:17:08 +0200
commit407746193d991190fa4dead94649abb2ed27d462 (patch)
treef79f67c3df8ed657a27abba6029a71be359871df /src/utils.c
parent5338bbf70d3e2c71fcbd0db54e14b6cf2d5616c3 (diff)
parent1f56e8e5d0000e1c46483530331887dbd0f8ce75 (diff)
downloadraylib-407746193d991190fa4dead94649abb2ed27d462.tar.gz
raylib-407746193d991190fa4dead94649abb2ed27d462.zip
Merge pull request #256 from raysan5/develop
Integrate develop branch
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c32
1 files changed, 10 insertions, 22 deletions
diff --git a/src/utils.c b/src/utils.c
index 6a07f301..c86c9c82 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -44,6 +44,9 @@
*
**********************************************************************************************/
+#define SUPPORT_TRACELOG // Output tracelog messages
+//#define SUPPORT_TRACELOG_DEBUG // Avoid DEBUG messages tracing
+
#include "utils.h"
#if defined(PLATFORM_ANDROID)
@@ -65,9 +68,6 @@
#define RRES_IMPLEMENTATION
#include "rres.h"
-//#define NO_TRACELOG // Avoid TraceLog() output (any type)
-#define DO_NOT_TRACE_DEBUG_MSGS // Avoid DEBUG messages tracing
-
//----------------------------------------------------------------------------------
// Global Variables Definition
//----------------------------------------------------------------------------------
@@ -88,15 +88,16 @@ 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;
+ int traceDebugMsgs = 0;
-#ifdef DO_NOT_TRACE_DEBUG_MSGS
- traceDebugMsgs = 0;
+#if defined(SUPPORT_TRACELOG_DEBUG)
+ traceDebugMsgs = 1;
#endif
switch(msgType)
@@ -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)