aboutsummaryrefslogtreecommitdiffstats
path: root/native/src
diff options
context:
space:
mode:
authorsatok <satok@google.com>2010-12-01 15:37:31 +0900
committersatok <satok@google.com>2010-12-01 15:56:17 +0900
commit15dc33d9f6ab9b0321f35be495a1a2c6a665ca85 (patch)
treef4e1d77a3615ec4e0e0adbf15352a891148cbb3c /native/src
parent965004fbe970e5e1bbff442d728997331b5f8007 (diff)
downloadlatinime-15dc33d9f6ab9b0321f35be495a1a2c6a665ca85.tar.gz
latinime-15dc33d9f6ab9b0321f35be495a1a2c6a665ca85.tar.xz
latinime-15dc33d9f6ab9b0321f35be495a1a2c6a665ca85.zip
Add an easy way to output native debug logs
Change-Id: Ieff2b8e60c5e7dedb7f86e17f7c37b349a912ab4
Diffstat (limited to 'native/src')
-rw-r--r--native/src/dictionary.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/native/src/dictionary.cpp b/native/src/dictionary.cpp
index 1a39f585b4..7f58fc137 100644
--- a/native/src/dictionary.cpp
+++ b/native/src/dictionary.cpp
@@ -19,15 +19,20 @@
#include <fcntl.h>
#include <sys/mman.h>
#include <string.h>
-//#define LOG_TAG "dictionary.cpp"
-//#include <cutils/log.h>
+
+#ifdef FLAG_DBG
+#define LOG_TAG "LatinIME: dictionary.cpp"
+#include <cutils/log.h>
+#define DEBUG_DICT 1
+#else // FLAG_DBG
#define LOGI
+#define DEBUG_DICT 0
+#endif // FLAG_DBG
#include "dictionary.h"
#include "basechars.h"
#include "char_utils.h"
-#define DEBUG_DICT 0
#define DICTIONARY_VERSION_MIN 200
#define DICTIONARY_HEADER_SIZE 2
#define NOT_VALID_WORD -99
@@ -36,6 +41,7 @@ namespace latinime {
Dictionary::Dictionary(void *dict, int typedLetterMultiplier, int fullWordMultiplier)
{
+ LOGI("Dictionary - constructor");
mDict = (unsigned char*) dict;
mTypedLetterMultiplier = typedLetterMultiplier;
mFullWordMultiplier = fullWordMultiplier;