aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/src/defines.h
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-12-13 08:33:57 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2013-12-13 08:33:57 -0800
commit3ac00d1889f7752bec6a653842a1fc2f079ab911 (patch)
treefc8c92ee41a00075830a6363bfeafe85aa8cbc0b /native/jni/src/defines.h
parent379a7e88efaff2af42313faddac86fbdfb5881d1 (diff)
parenta245d15da5d295af21ead9a01583c64796a31ad7 (diff)
downloadlatinime-3ac00d1889f7752bec6a653842a1fc2f079ab911.tar.gz
latinime-3ac00d1889f7752bec6a653842a1fc2f079ab911.tar.xz
latinime-3ac00d1889f7752bec6a653842a1fc2f079ab911.zip
am a245d15d: Have dicttool use the native library to generate v4 dicts.
* commit 'a245d15da5d295af21ead9a01583c64796a31ad7': Have dicttool use the native library to generate v4 dicts.
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)