pwu pushed to ibus-libpinyin (master). "remove old patch"
notifications at fedoraproject.org
notifications at fedoraproject.org
Wed Mar 25 07:14:30 UTC 2015
>From 60722b94694ec718db5f0585199424d6f2b1e9fa Mon Sep 17 00:00:00 2001
From: Peng Wu <alexepico at gmail.com>
Date: Wed, 25 Mar 2015 15:12:11 +0800
Subject: remove old patch
diff --git a/ibus-libpinyin-use-opencc.patch b/ibus-libpinyin-use-opencc.patch
deleted file mode 100644
index aa85037..0000000
--- a/ibus-libpinyin-use-opencc.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-Index: ibus-libpinyin-1.6.92/src/PYSimpTradConverter.cc
-===================================================================
---- ibus-libpinyin-1.6.92.orig/src/PYSimpTradConverter.cc
-+++ ibus-libpinyin-1.6.92/src/PYSimpTradConverter.cc
-@@ -40,44 +40,27 @@ namespace PY {
- #ifdef HAVE_OPENCC
-
- class opencc {
-- static const int BUFFER_SIZE = 64;
- public:
- opencc (void)
- {
-- m_od = opencc_open (OPENCC_DEFAULT_CONFIG_SIMP_TO_TRAD);
-- g_assert (m_od != NULL);
-+ m_cc = opencc_open (OPENCC_DEFAULT_CONFIG_SIMP_TO_TRAD);
-+ g_assert (m_cc != NULL);
- }
-
- ~opencc (void)
- {
-- opencc_close(m_od);
-+ opencc_close(m_cc);
- }
-
- 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_od, &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_od;
-- gunichar m_buffer[BUFFER_SIZE + 1];
-+ opencc_t m_cc;
- };
-
- void
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/ibus-libpinyin.git/commit/?h=master&id=60722b94694ec718db5f0585199424d6f2b1e9fa
--
You received this message due to your preference settings at
https://apps.fedoraproject.org/notifications//fmnscmcommits.id.fedoraproject.org/email/29390
More information about the scm-commits
mailing list