aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/src/debug.h
diff options
context:
space:
mode:
authorKen Wakasa <kwakasa@google.com>2012-07-25 17:51:43 +0900
committerKen Wakasa <kwakasa@google.com>2012-07-25 18:56:51 +0900
commit0bbb917d12358e0264796e75dea888f244761b64 (patch)
treef76662d6f1962d08021b4949d1c9e6585050c6b7 /native/jni/src/debug.h
parent0657b9698a110f8e895448d829478982ce37b6d1 (diff)
downloadlatinime-0bbb917d12358e0264796e75dea888f244761b64.tar.gz
latinime-0bbb917d12358e0264796e75dea888f244761b64.tar.xz
latinime-0bbb917d12358e0264796e75dea888f244761b64.zip
Cosmetic fixes and style fixes
Change-Id: I69c42ff945cdf0d5205c6ca61d6861a0479492dc
Diffstat (limited to 'native/jni/src/debug.h')
-rw-r--r--native/jni/src/debug.h43
1 files changed, 21 insertions, 22 deletions
diff --git a/native/jni/src/debug.h b/native/jni/src/debug.h
index 376ba59d9..2fee6e83f 100644
--- a/native/jni/src/debug.h
+++ b/native/jni/src/debug.h
@@ -1,26 +1,26 @@
/*
-**
-** Copyright 2011, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+ *
+ * Copyright 2011, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
#ifndef LATINIME_DEBUG_H
#define LATINIME_DEBUG_H
#include "defines.h"
-static inline unsigned char* convertToUnibyteString(unsigned short* input, unsigned char* output,
+static inline unsigned char *convertToUnibyteString(unsigned short *input, unsigned char *output,
const unsigned int length) {
unsigned int i = 0;
for (; i <= length && input[i] != 0; ++i)
@@ -29,8 +29,8 @@ static inline unsigned char* convertToUnibyteString(unsigned short* input, unsig
return output;
}
-static inline unsigned char* convertToUnibyteStringAndReplaceLastChar(unsigned short* input,
- unsigned char* output, const unsigned int length, unsigned char c) {
+static inline unsigned char *convertToUnibyteStringAndReplaceLastChar(unsigned short *input,
+ unsigned char *output, const unsigned int length, unsigned char c) {
unsigned int i = 0;
for (; i <= length && input[i] != 0; ++i)
output[i] = input[i] & 0xFF;
@@ -39,7 +39,7 @@ static inline unsigned char* convertToUnibyteStringAndReplaceLastChar(unsigned s
return output;
}
-static inline void LOGI_S16(unsigned short* string, const unsigned int length) {
+static inline void LOGI_S16(unsigned short *string, const unsigned int length) {
unsigned char tmp_buffer[length];
convertToUnibyteString(string, tmp_buffer, length);
AKLOGI(">> %s", tmp_buffer);
@@ -49,7 +49,7 @@ static inline void LOGI_S16(unsigned short* string, const unsigned int length) {
// usleep(10);
}
-static inline void LOGI_S16_PLUS(unsigned short* string, const unsigned int length,
+static inline void LOGI_S16_PLUS(unsigned short *string, const unsigned int length,
unsigned char c) {
unsigned char tmp_buffer[length+1];
convertToUnibyteStringAndReplaceLastChar(string, tmp_buffer, length, c);
@@ -58,7 +58,7 @@ static inline void LOGI_S16_PLUS(unsigned short* string, const unsigned int leng
// usleep(10);
}
-static inline void printDebug(const char* tag, int* codes, int codesSize, int MAX_PROXIMITY_CHARS) {
+static inline void printDebug(const char *tag, int *codes, int codesSize, int MAX_PROXIMITY_CHARS) {
unsigned char *buf = (unsigned char*)malloc((1 + codesSize) * sizeof(*buf));
buf[codesSize] = 0;
@@ -68,5 +68,4 @@ static inline void printDebug(const char* tag, int* codes, int codesSize, int MA
free(buf);
}
-
#endif // LATINIME_DEBUG_H