Update to 1.7.0
This commit is contained in:
parent
ab7acbba15
commit
b6590e8230
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
/ibus-libzhuyin-1.6.99.20140626.tar.gz
|
||||
/ibus-libzhuyin-1.6.99.20140718.tar.gz
|
||||
/ibus-libzhuyin-1.6.99.20140929.tar.gz
|
||||
/ibus-libzhuyin-1.7.0.tar.gz
|
||||
|
@ -1,47 +0,0 @@
|
||||
Index: ibus-libzhuyin-1.6.99.20140929/src/ZYTradSimpConverter.cc
|
||||
===================================================================
|
||||
--- ibus-libzhuyin-1.6.99.20140929.orig/src/ZYTradSimpConverter.cc
|
||||
+++ ibus-libzhuyin-1.6.99.20140929/src/ZYTradSimpConverter.cc
|
||||
@@ -33,7 +33,6 @@
|
||||
namespace ZY {
|
||||
|
||||
class opencc {
|
||||
- static const int BUFFER_SIZE = 64;
|
||||
public:
|
||||
opencc (void)
|
||||
{
|
||||
@@ -48,30 +47,14 @@ public:
|
||||
|
||||
void convert (const gchar *in, String &out)
|
||||
{
|
||||
- glong n_char;
|
||||
- gunichar *in_ucs4 = g_utf8_to_ucs4_fast (in, -1, &n_char);
|
||||
-
|
||||
- ucs4_t *pinbuf = (ucs4_t *)in_ucs4;
|
||||
- size_t inbuf_left = n_char;
|
||||
- while (inbuf_left != 0) {
|
||||
- ucs4_t *poutbuf = (ucs4_t *)m_buffer;
|
||||
- size_t outbuf_left = BUFFER_SIZE;
|
||||
- size_t retval = opencc_convert(m_cc, &pinbuf, &inbuf_left, &poutbuf, &outbuf_left);
|
||||
- if (retval == (size_t) -1) {
|
||||
- /* append left chars in pinbuf */
|
||||
- g_warning ("opencc_convert return failed");
|
||||
- out << (gunichar *) pinbuf;
|
||||
- break;
|
||||
- }
|
||||
- *poutbuf = L'\0';
|
||||
- out << m_buffer;
|
||||
- }
|
||||
- g_free (in_ucs4);
|
||||
+ char * converted = opencc_convert_utf8 (m_cc, in, -1);
|
||||
+ g_assert (converted != NULL);
|
||||
+ out = converted;
|
||||
+ opencc_convert_utf8_free (converted);
|
||||
}
|
||||
|
||||
private:
|
||||
opencc_t m_cc;
|
||||
- gunichar m_buffer[BUFFER_SIZE + 1];
|
||||
};
|
||||
|
||||
void
|
@ -1,8 +1,8 @@
|
||||
%global snapshot 1
|
||||
%global snapshot 0
|
||||
|
||||
Name: ibus-libzhuyin
|
||||
Version: 1.6.99.20140929
|
||||
Release: 2%{?dist}
|
||||
Version: 1.7.0
|
||||
Release: 1%{?dist}
|
||||
Summary: New Zhuyin engine based on libzhuyin for IBus
|
||||
License: GPLv2+
|
||||
URL: https://github.com/libzhuyin/ibus-libzhuyin
|
||||
@ -47,7 +47,9 @@ make %{?_smp_mflags} V=1
|
||||
%install
|
||||
make install DESTDIR=${RPM_BUILD_ROOT} INSTALL="install -p"
|
||||
|
||||
%files
|
||||
%find_lang %{name}
|
||||
|
||||
%files -f %{name}.lang
|
||||
%doc AUTHORS COPYING README
|
||||
%{_datadir}/applications/ibus-setup-libzhuyin.desktop
|
||||
%{_libexecdir}/ibus-engine-libzhuyin
|
||||
@ -60,6 +62,9 @@ make install DESTDIR=${RPM_BUILD_ROOT} INSTALL="install -p"
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Mar 24 2015 Peng Wu <pwu@redhat.com> - 1.7.0-1
|
||||
- Update to 1.7.0
|
||||
|
||||
* Wed Jan 7 2015 Peng Wu <pwu@redhat.com> - 1.6.99.20140929-2
|
||||
- Use opencc 1.0.2
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user