From dc44fd479c3947b56ae52ee9b07af42f6da73330 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 29 Nov 2015 03:08:27 +0100 Subject: [PATCH] Move more code to verbosity.c --- verbosity.c | 32 ++++++++++++++++++++++++++++++++ verbosity.h | 32 -------------------------------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/verbosity.c b/verbosity.c index 22e607ada9..d3653bb649 100644 --- a/verbosity.c +++ b/verbosity.c @@ -13,8 +13,30 @@ * If not, see . */ + +#if defined(HAVE_FILE_LOGGER) +#define LOG_FILE (retro_main_log_file()) +#else +#define LOG_FILE (stderr) +#endif + +#if defined(IS_SALAMANDER) +#define PROGRAM_NAME "RetroArch Salamander" +#elif defined(RARCH_INTERNAL) +#define PROGRAM_NAME "RetroArch" +#elif defined(MARCH_INTERNAL) +#define PROGRAM_NAME "MicroArch" +#else +#define PROGRAM_NAME "N/A" +#endif + #include "verbosity.h" +#if TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR +static aslclient asl_client; +static int asl_inited = 0; +#endif + static bool main_verbosity; /* If this is non-NULL. RARCH_LOG and friends @@ -48,6 +70,15 @@ void retro_main_log_file_deinit(void) } #if !defined(HAVE_LOGGER) +static bool RARCH_LOG_VERBOSE(void) +{ + bool *verbose = NULL; + verbose = retro_main_verbosity(); + if (!verbose) + return false; + return *verbose; +} + void RARCH_LOG_V(const char *tag, const char *fmt, va_list ap) { if (!RARCH_LOG_VERBOSE()) @@ -145,3 +176,4 @@ void RARCH_ERR(const char *fmt, ...) va_end(ap); } #endif + diff --git a/verbosity.h b/verbosity.h index 709abf6c5c..b609e64b33 100644 --- a/verbosity.h +++ b/verbosity.h @@ -52,38 +52,6 @@ void retro_main_log_file_deinit(void); void retro_main_log_file_init(const char *path); -#if defined(HAVE_FILE_LOGGER) - -#define LOG_FILE (retro_main_log_file()) - -#else -#define LOG_FILE (stderr) -#endif - -#if defined(IS_SALAMANDER) -#define PROGRAM_NAME "RetroArch Salamander" -#elif defined(RARCH_INTERNAL) -#define PROGRAM_NAME "RetroArch" -#elif defined(MARCH_INTERNAL) -#define PROGRAM_NAME "MicroArch" -#else -#define PROGRAM_NAME "N/A" -#endif - -static INLINE bool RARCH_LOG_VERBOSE(void) -{ - bool *verbose = NULL; - verbose = retro_main_verbosity(); - if (!verbose) - return false; - return *verbose; -} - -#if TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR -static aslclient asl_client; -static int asl_inited = 0; -#endif - #if defined(HAVE_LOGGER) #define BUFSIZE (64 * 1024)