0 | |
From 201a53c45401637b57f198074f4dce5666bc92bd Mon Sep 17 00:00:00 2001
|
|
0 |
From 0758147463701aa40bc622c9b93c177f2cc5b3e3 Mon Sep 17 00:00:00 2001
|
1 | 1 |
From: Nobuhiro Iwamatsu <iwamatsu@debian.org>
|
2 | 2 |
Date: Tue, 3 Apr 2018 08:27:47 +0900
|
3 | |
Subject: [PATCH 1/6] Update uim-mozc to
|
|
3 |
Subject: [PATCH ] Update uim-mozc to
|
4 | 4 |
c979f127acaeb7b35d3344e8b1e40848e1a68d54
|
5 | 5 |
|
6 | 6 |
Description: Support uim framewor
|
7 | 7 |
Origin: macuim project: https://github.com/e-kato/macuim.git c979f127acaeb7b35d3344e8b1e40848e1a68d54
|
8 | 8 |
Forwarded: http://code.google.com/p/mozc/issues/detail?id=13
|
9 | 9 |
Author: uim Project http://code.google.com/p/uim/
|
10 | |
Last-Update: 2018-04-03
|
|
10 |
Last-Update: 2020-12-28
|
|
11 |
|
|
12 |
* Fix mozc::InitMozc
|
|
13 |
* Use Utf8SubString instead of SubString
|
11 | 14 |
|
12 | 15 |
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@debian.org>
|
13 | 16 |
---
|
|
593 | 596 |
+#endif // MOZC_UNIX_UIM_KEY_TRANSLATOR_H_
|
594 | 597 |
diff --git a/src/unix/uim/mozc.cc b/src/unix/uim/mozc.cc
|
595 | 598 |
new file mode 100644
|
596 | |
index 00000000..31fc3a26
|
|
599 |
index 00000000..ceb16bd8
|
597 | 600 |
--- /dev/null
|
598 | 601 |
+++ b/src/unix/uim/mozc.cc
|
599 | 602 |
@@ -0,0 +1,1219 @@
|
|
772 | 775 |
+{
|
773 | 776 |
+ size_t len = segment.value_length();
|
774 | 777 |
+
|
775 | |
+ string former = Util::SubString(segment.value(), 0, pos);
|
776 | |
+ string latter = Util::SubString(segment.value(), pos, len);
|
|
778 |
+ auto former = string(Util::Utf8SubString(segment.value(), 0, pos));
|
|
779 |
+ auto latter = string(Util::Utf8SubString(segment.value(), pos, len));
|
777 | 780 |
+
|
778 | 781 |
+ uim_lisp seg_f, seg_c, seg_l;
|
779 | 782 |
+ if (pos == 0) {
|
|
1798 | 1801 |
+ argv[0] = (char *)name;
|
1799 | 1802 |
+ argv[1] = NULL;
|
1800 | 1803 |
+
|
1801 | |
+ mozc::InitMozc((const char *)argv[0], &argc, (char ***)&argv, true);
|
|
1804 |
+ mozc::InitMozc((const char *)argv[0], &argc, (char ***)&argv);
|
1802 | 1805 |
+ mozc::uim::install_keymap();
|
1803 | 1806 |
+}
|
1804 | 1807 |
+
|