<commit_before>/*
 * Copyright (c) 2012-2015 <NAME> and individual contributors.
 * License: https://github.com/taylor001/crown/blob/master/LICENSE
 */

#pragma once

#include "config.h"
#include "types.h"
#include "vector.h"
#include "dynamic_string.h"
#include "string_utils.h"
#include "error.h"
#include "temp_allocator.h"

#if CROWN_PLATFORM_POSIX
	#include <cstdarg>
	#include <cstdio>
	#include <cstdlib>
	#include <dirent.h>
	#include <dlfcn.h>
	#include <sys/stat.h>
	#include <sys/time.h>
	#include <sys/types.h>
	#include <sys/wait.h>
	#include <errno.h>
	#include <time.h>
	#include <unistd.h>
#elif CROWN_PLATFORM_WINDOWS
	#include <win_headers.h>
	#include <io.h>
#endif
#if CROWN_PLATFORM_ANDROID
	#include <android/log.h>
#endif

namespace crown
{
namespace os
{
	inline void log(const char* msg)
	{
#if CROWN_PLATFORM_ANDROID
		__android_log_write(ANDROID_LOG_DEBUG, "crown", msg);
#else
		puts(msg);
		fflush(stdout);
#endif
	}

	inline bool exists(const char* path)
	{
#if CROWN_PLATFORM_POSIX
		return access(path, F_OK) != -1;
#elif CROWN_PLATFORM_WINDOWS<commit_msg>Cleanup<commit_after>/*
 * Copyright (c) 2012-2015 <NAME> and individual contributors.
 * License: https://github.com/taylor001/crown/blob/master/LICENSE
 */

#pragma once

#include "config.h"
#include "types.h"
#include "vector.h"
#include "dynamic_string.h"
#include "string_utils.h"
#include "error.h"
#include "temp_allocator.h"

#if CROWN_PLATFORM_POSIX
	#include <dirent.h>
	#include <dlfcn.h>
	#include <sys/stat.h>
	#include <sys/time.h>
	#include <sys/wait.h>
	#include <errno.h>
	#include <time.h>
	#include <unistd.h>
#elif CROWN_PLATFORM_WINDOWS
	#include <win_headers.h>
	#include <io.h>
#endif
#if CROWN_PLATFORM_ANDROID
	#include <android/log.h>
#endif

namespace crown
{
namespace os
{
	inline void log(const char* msg)
	{
#if CROWN_PLATFORM_ANDROID
		__android_log_write(ANDROID_LOG_DEBUG, "crown", msg);
#else
		puts(msg);
		fflush(stdout);
#endif
	}

	inline bool exists(const char* path)
	{
#if CROWN_PLATFORM_POSIX
		return access(path, F_OK) != -1;
#elif CROWN_PLATFORM_WINDOWS
{'fraction_non_alphanumeric': 0.14374700527072354, 'fraction_numerical': 0.011499760421657882, 'mean_word_length': 5.15929203539823, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, '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': '451878', 'n_tokens_mistral': 914, 'n_tokens_neox': 865, 'n_words': 181}