Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 50 lines (44 sloc) 2.156 kb
1f1b68f @hxw [grifo] tidy up spacing and remove CR characters
hxw authored
1 /*
2 * Copyright (c) 2009 Openmoko Inc.
3 *
4 * Authors Holger Hans Peter Freyther <zecke@openmoko.org>
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef LANGUAGES_H
21 #define LANGUAGES_H
22
23 #define JAMO_INDEX_EXCLUDE_BASE 0x0000FFFF
24 #define JAMO_INDEX_BASE 0x00010000
25 #define INITIAL_JAMO_BASE 0x00010000
26 #define MEDIAL_JAMO_BASE 0x00020000
27 #define FINAL_JAMO_BASE 0x00040000
28 #define INITIAL_JAMO_COUNT 19
29 #define MEDIAL_JAMO_COUNT 21
30 #define FINAL_JAMO_COUNT 28
31
32 enum
33 {
34 STATE_INITIAL,
35 STATE_AFTER_INITIAL_JAMO,
36 STATE_AFTER_MEDIAL_JAMO,
37 };
38
39 int zh_jp_to_english(unsigned char *sEnglish, int maxLenEnglish, unsigned char *sHiragana, int *lenHiragana);
40 const unsigned char *get_hiragana(const unsigned char *in_str, int len, int *used_len);
41 const unsigned char *get_english(const unsigned char *in_str, int len, int *used_len);
42 void hiragana_romaji_conversion(unsigned char *search_string_per_language, int *search_str_per_language_len);
43 int replace_japanese_sonant(unsigned char *search_string_per_language, int *search_str_per_language_len, unsigned char *search_string, int *search_str_len);
44 int replace_hiragana_backward(unsigned char *search_string_per_language, int *search_str_per_language_len, unsigned char *search_string, int *search_str_len);
45 void alphabet_to_korean_jamo(unsigned char *jamo, const unsigned char eng);
46 int english_to_korean(unsigned char *out_str, int max_out_len, unsigned char *in_str, int *in_len);
47 int english_to_korean_phonetic(unsigned char *out_str, int max_out_len, unsigned char *in_str, int *in_len);
48
49 #endif
Something went wrong with that request. Please try again.