<commit_before>//--------------------------------------------------------------------------//
/// Copyright (c) 2019 by <NAME>. All Rights Reserved.                ///
/// License: http://www.opensource.org/licenses/BSD-2-Clause               ///
//--------------------------------------------------------------------------//

#ifndef RTM_RBASE_DEBUG_H
#define RTM_RBASE_DEBUG_H

#include <rbase/inc/platform.h>

#if RTM_PLATFORM_WINDOWS
	extern "C" __declspec(dllimport) void __stdcall OutputDebugStringA(const char* _str);
#elif RTM_PLATFORM_ANDROID
	#include <android/log.h>
#else
	#include <stdio.h>
#endif

namespace rtm {

	static inline void debugBreak()
	{
		RTM_BREAK;
	}

	static inline void debugOutput(const char* _out)
	{
#if RTM_PLATFORM_WINDOWS
		OutputDebugStringA(_out);
#elif RTM_PLATFORM_ANDROID
		__android_log_write(ANDROID_LOG_DEBUG, "", _out);
#else
		fputs(_out, stderr);
		fflush(stderr);
#endif
	}

} // namespace rtm

#endif // RTM_RBASE_DEBUG_H
<commit_msg>Add debug output on Emscripten<commit_after>//--------------------------------------------------------------------------//
/// Copyright (c) 2019 by <NAME>. All Rights Reserved.                ///
/// License: http://www.opensource.org/licenses/BSD-2-Clause               ///
//--------------------------------------------------------------------------//

#ifndef RTM_RBASE_DEBUG_H
#define RTM_RBASE_DEBUG_H

#include <rbase/inc/platform.h>

#if RTM_PLATFORM_WINDOWS
	extern "C" __declspec(dllimport) void __stdcall OutputDebugStringA(const char* _str);
#elif RTM_PLATFORM_ANDROID
	#include <android/log.h>
#elif RTM_PLATFORM_EMSCRIPTEN
	#include <emscripten/emscripten.h>
#else
	#include <stdio.h>
#endif

namespace rtm {

	static inline void debugBreak()
	{
		RTM_BREAK;
	}

	static inline void debugOutput(const char* _out)
	{
#if RTM_PLATFORM_WINDOWS
		OutputDebugStringA(_out);
#elif RTM_PLATFORM_ANDROID
		__android_log_write(ANDROID_LOG_DEBUG, "", _out);
#elif RTM_PLATFORM_EMSCRIPTEN
		emscripten_log(EM_LOG_CONSOLE, "%s", _out);
#else
		fputs(_out, stderr);
		fflush(stderr);
#endif
	}

} // namespace rtm

#endif // RTM_RBASE_DEBUG_H

{'fraction_non_alphanumeric': 0.24565523720056365, 'fraction_numerical': 0.004697040864255519, 'mean_word_length': 2.2126696832579187, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1715612', 'n_tokens_mistral': 755, 'n_tokens_neox': 720, 'n_words': 141}