diff options
author | 2012-09-12 13:17:30 -0700 | |
---|---|---|
committer | 2012-09-12 13:17:30 -0700 | |
commit | fc795e740c072fbaedb8abd50cf0df4a35e9490d (patch) | |
tree | 8ac61f193e91a643ed123334c103f6cda38ce824 | |
parent | 819bbcd436f5149a9807297e85a5392d4df5b12b (diff) | |
parent | 296d7f31d3a3fcd3d0c3d51864b391d9b380b2ab (diff) | |
download | latinime-fc795e740c072fbaedb8abd50cf0df4a35e9490d.tar.gz latinime-fc795e740c072fbaedb8abd50cf0df4a35e9490d.tar.xz latinime-fc795e740c072fbaedb8abd50cf0df4a35e9490d.zip |
am 296d7f31: am 41c2765b: Remove an unused file.
* commit '296d7f31d3a3fcd3d0c3d51864b391d9b380b2ab':
Remove an unused file.
-rw-r--r-- | native/jni/src/debug.h | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/native/jni/src/debug.h b/native/jni/src/debug.h deleted file mode 100644 index 8f6b69d77..000000000 --- a/native/jni/src/debug.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 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, - const unsigned int length) { - unsigned int i = 0; - for (; i < length && input[i] != 0; ++i) - output[i] = input[i] & 0xFF; - output[i] = 0; - return output; -} - -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; - if (i > 0) output[i-1] = c; - output[i] = 0; - return output; -} - -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); - // The log facility is throwing out log that comes too fast. The following - // is a dirty way of slowing down processing so that we can see all log. - // TODO : refactor this in a blocking log or something. - // usleep(10); -} - -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); - AKLOGI(">> %s", tmp_buffer); - // Likewise - // usleep(10); -} - -static inline void printDebug(const char *tag, int *codes, int codesSize, int MAX_PROXIMITY_CHARS) { - unsigned char *buf = static_cast<unsigned char *>(malloc((1 + codesSize) * sizeof(*buf))); - - buf[codesSize] = 0; - while (--codesSize >= 0) { - buf[codesSize] = static_cast<unsigned char>(codes[codesSize * MAX_PROXIMITY_CHARS]); - } - AKLOGI("%s, WORD = %s", tag, buf); - - free(buf); -} -#endif // LATINIME_DEBUG_H |