aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/src/defines.h
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-12-12 15:08:10 +0900
committerJean Chalard <jchalard@google.com>2013-12-13 18:18:20 +0900
commita245d15da5d295af21ead9a01583c64796a31ad7 (patch)
tree1156247b156533c7b946f0f42c1d74642ea991e1 /native/jni/src/defines.h
parentaf0c222a5ec4a8dda3db7b99b2e641434f2c4225 (diff)
downloadlatinime-a245d15da5d295af21ead9a01583c64796a31ad7.tar.gz
latinime-a245d15da5d295af21ead9a01583c64796a31ad7.tar.xz
latinime-a245d15da5d295af21ead9a01583c64796a31ad7.zip
Have dicttool use the native library to generate v4 dicts.
Yay ! Change-Id: Iea8ced9e81031b9ab7eff05ad9ef7215be248de9
Diffstat (limited to 'native/jni/src/defines.h')
-rw-r--r--native/jni/src/defines.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/native/jni/src/defines.h b/native/jni/src/defines.h
index 9a26fe051..1969ebae0 100644
--- a/native/jni/src/defines.h
+++ b/native/jni/src/defines.h
@@ -87,12 +87,21 @@ AK_FORCE_INLINE static int intArrayToCharArray(const int *const source, const in
}
#if defined(FLAG_DO_PROFILE) || defined(FLAG_DBG)
+#if defined(__ANDROID__)
#include <android/log.h>
+#endif // defined(__ANDROID__)
#ifndef LOG_TAG
#define LOG_TAG "LatinIME: "
#endif // LOG_TAG
+
+#if defined(HOST_TOOL)
+#include <stdio.h>
+#define AKLOGE(fmt, ...) printf(fmt "\n", ##__VA_ARGS__)
+#define AKLOGI(fmt, ...) printf(fmt "\n", ##__VA_ARGS__)
+#else // defined(HOST_TOOL)
#define AKLOGE(fmt, ...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, fmt, ##__VA_ARGS__)
#define AKLOGI(fmt, ...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, fmt, ##__VA_ARGS__)
+#endif // defined(HOST_TOOL)
#define DUMP_RESULT(words, frequencies) do { dumpResult(words, frequencies); } while (0)
#define DUMP_WORD(word, length) do { dumpWord(word, length); } while (0)