Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LatinIME
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
keyboard
LatinIME
Commits
15dc33d9
Commit
15dc33d9
authored
14 years ago
by
satok
Browse files
Options
Downloads
Patches
Plain Diff
Add an easy way to output native debug logs
Change-Id: Ieff2b8e60c5e7dedb7f86e17f7c37b349a912ab4
parent
965004fb
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
native/Android.mk
+12
-1
12 additions, 1 deletion
native/Android.mk
native/src/dictionary.cpp
+9
-3
9 additions, 3 deletions
native/src/dictionary.cpp
with
21 additions
and
4 deletions
native/Android.mk
+
12
−
1
View file @
15dc33d9
...
@@ -8,11 +8,22 @@ LOCAL_SRC_FILES := \
...
@@ -8,11 +8,22 @@ LOCAL_SRC_FILES := \
src/dictionary.cpp
\
src/dictionary.cpp
\
src/char_utils.cpp
src/char_utils.cpp
LOCAL_NDK_VERSION
:=
4
#FLAG_DBG := true
ifneq
($(FLAG_DBG), true)
LOCAL_NDK_VERSION
:=
4
endif
LOCAL_SDK_VERSION
:=
8
LOCAL_SDK_VERSION
:=
8
LOCAL_MODULE
:=
libjni_latinime
LOCAL_MODULE
:=
libjni_latinime
LOCAL_MODULE_TAGS
:=
user
LOCAL_MODULE_TAGS
:=
user
ifeq
($(FLAG_DBG), true)
$(
warning
"Making debug build."
)
LOCAL_CFLAGS
+=
-DFLAG_DBG
LOCAL_SHARED_LIBRARIES
:=
libcutils libutils
endif
include
$(BUILD_SHARED_LIBRARY)
include
$(BUILD_SHARED_LIBRARY)
This diff is collapsed.
Click to expand it.
native/src/dictionary.cpp
+
9
−
3
View file @
15dc33d9
...
@@ -19,15 +19,20 @@
...
@@ -19,15 +19,20 @@
#include
<fcntl.h>
#include
<fcntl.h>
#include
<sys/mman.h>
#include
<sys/mman.h>
#include
<string.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 LOGI
#define DEBUG_DICT 0
#endif // FLAG_DBG
#include
"dictionary.h"
#include
"dictionary.h"
#include
"basechars.h"
#include
"basechars.h"
#include
"char_utils.h"
#include
"char_utils.h"
#define DEBUG_DICT 0
#define DICTIONARY_VERSION_MIN 200
#define DICTIONARY_VERSION_MIN 200
#define DICTIONARY_HEADER_SIZE 2
#define DICTIONARY_HEADER_SIZE 2
#define NOT_VALID_WORD -99
#define NOT_VALID_WORD -99
...
@@ -36,6 +41,7 @@ namespace latinime {
...
@@ -36,6 +41,7 @@ namespace latinime {
Dictionary
::
Dictionary
(
void
*
dict
,
int
typedLetterMultiplier
,
int
fullWordMultiplier
)
Dictionary
::
Dictionary
(
void
*
dict
,
int
typedLetterMultiplier
,
int
fullWordMultiplier
)
{
{
LOGI
(
"Dictionary - constructor"
);
mDict
=
(
unsigned
char
*
)
dict
;
mDict
=
(
unsigned
char
*
)
dict
;
mTypedLetterMultiplier
=
typedLetterMultiplier
;
mTypedLetterMultiplier
=
typedLetterMultiplier
;
mFullWordMultiplier
=
fullWordMultiplier
;
mFullWordMultiplier
=
fullWordMultiplier
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment