summaryrefslogtreecommitdiff
path: root/inputmethod/scim/patches
diff options
context:
space:
mode:
Diffstat (limited to 'inputmethod/scim/patches')
-rw-r--r--inputmethod/scim/patches/patch-ab171
-rw-r--r--inputmethod/scim/patches/patch-ac13
-rw-r--r--inputmethod/scim/patches/patch-ad13
-rw-r--r--inputmethod/scim/patches/patch-ae13
-rw-r--r--inputmethod/scim/patches/patch-af13
-rw-r--r--inputmethod/scim/patches/patch-ag13
-rw-r--r--inputmethod/scim/patches/patch-ah156
-rw-r--r--inputmethod/scim/patches/patch-bb54
-rw-r--r--inputmethod/scim/patches/patch-bc20
-rw-r--r--inputmethod/scim/patches/patch-bd12
-rw-r--r--inputmethod/scim/patches/patch-be14
11 files changed, 492 insertions, 0 deletions
diff --git a/inputmethod/scim/patches/patch-ab b/inputmethod/scim/patches/patch-ab
new file mode 100644
index 00000000000..905f46cc381
--- /dev/null
+++ b/inputmethod/scim/patches/patch-ab
@@ -0,0 +1,171 @@
+$NetBSD: patch-ab,v 1.1.1.1 2009/11/24 11:46:01 obache Exp $
+
+--- src/scim_chartraits.cpp.orig 2008-11-02 06:42:37.000000000 +0000
++++ src/scim_chartraits.cpp
+@@ -26,4 +26,5 @@
+ */
+
++#if 0
+ #include <string>
+ #include "scim_types.h"
+@@ -41,27 +42,33 @@ namespace std
+
+ template<>
+-void
+-char_traits<ucs4_t>::assign(char_type& __c1, const char_type& __c2)
++struct char_traits<ucs4_t>
++{
++
++typedef ucs4_t char_type;
++typedef ucs4_t int_type;
++typedef streampos pos_type;
++typedef streamoff off_type;
++typedef mbstate_t state_type;
++
++static void
++assign(char_type& __c1, const char_type& __c2)
+ {
+ __c1 = __c2;
+ }
+
+-template<>
+-bool
+-char_traits<ucs4_t>::eq(const char_type& __c1, const char_type& __c2)
++static bool
++eq(const char_type& __c1, const char_type& __c2)
+ {
+ return __c1 == __c2;
+ }
+
+-template<>
+-bool
+-char_traits<ucs4_t>::lt(const char_type& __c1, const char_type& __c2)
++static bool
++lt(const char_type& __c1, const char_type& __c2)
+ {
+ return __c1 < __c2;
+ }
+
+-template<>
+-char_traits<ucs4_t>::char_type*
+-char_traits<ucs4_t>::assign(char_type* __s, size_t __n, char_type __a)
++static char_type*
++assign(char_type* __s, size_t __n, char_type __a)
+ {
+ char_type* dest = __s;
+@@ -71,7 +78,6 @@ char_traits<ucs4_t>::assign(char_type* _
+ }
+
+-template<>
+-char_traits<ucs4_t>::char_type*
+-char_traits<ucs4_t>::copy(char_type* __s1, const char_type* __s2, size_t __n)
++static char_type*
++copy(char_type* __s1, const char_type* __s2, size_t __n)
+ {
+ char_type* dest = __s1;
+@@ -82,13 +88,12 @@ char_traits<ucs4_t>::copy(char_type* __s
+ }
+
+-template<>
+-char_traits<ucs4_t>::char_type*
+-char_traits<ucs4_t>::move(char_type* __s1, const char_type* __s2, size_t __n)
++static char_type*
++move(char_type* __s1, const char_type* __s2, size_t __n)
+ {
+- if (__s1 + __n > __s2) {
++ if (__s1 > __s2) {
+ char_type* dest = __s1 + __n - 1;
+- const char_type* from = __s2;
++ const char_type* from = __s2 + __n - 1;
+ while (__n-- > 0)
+- *(dest--) = *(from++);
++ *(dest--) = *(from--);
+ return __s1;
+ } else {
+@@ -97,7 +102,6 @@ char_traits<ucs4_t>::move(char_type* __s
+ }
+
+-template<>
+-size_t
+-char_traits<ucs4_t>::length(const char_type* __s)
++static size_t
++length(const char_type* __s)
+ {
+ size_t __result = 0;
+@@ -107,7 +111,6 @@ char_traits<ucs4_t>::length(const char_t
+ }
+
+-template<>
+-int
+-char_traits<ucs4_t>::compare(const char_type* __s1, const char_type* __s2, size_t __n)
++static int
++compare(const char_type* __s1, const char_type* __s2, size_t __n)
+ {
+ while ( (*__s1 == *__s2++) && __n-- > 0 )
+@@ -118,7 +121,6 @@ char_traits<ucs4_t>::compare(const char_
+ }
+
+-template<>
+-const char_traits<ucs4_t>::char_type*
+-char_traits<ucs4_t>::find(const char_type* __s, size_t __n, const char_type& __a)
++static const char_type*
++find(const char_type* __s, size_t __n, const char_type& __a)
+ {
+ while (__n-- > 0) {
+@@ -130,40 +132,38 @@ char_traits<ucs4_t>::find(const char_typ
+ }
+
+-template<>
+-char_traits<ucs4_t>::char_type
+-char_traits<ucs4_t>::to_char_type (const int_type& __c)
++static char_type
++to_char_type(const int_type& __c)
+ {
+ return static_cast<char_type>(__c);
+ }
+
+-template<>
+-char_traits<ucs4_t>::int_type
+-char_traits<ucs4_t>::to_int_type (const char_type& __c)
++static int_type
++to_int_type(const char_type& __c)
+ {
+ return static_cast<int_type>(__c);
+ }
+
+-template<>
+-bool
+-char_traits<ucs4_t>::eq_int_type(const int_type& __c1, const int_type& __c2)
++static bool
++eq_int_type(const int_type& __c1, const int_type& __c2)
+ {
+ return __c1 == __c2;
+ }
+
+-template<>
+-char_traits<ucs4_t>::int_type
+-char_traits<ucs4_t>::eof ()
++static int_type
++eof()
+ {
+- return static_cast<int_type>(EOF);
++ return static_cast<int_type>(-1);
+ }
+
+-template<>
+-char_traits<ucs4_t>::int_type
+-char_traits<ucs4_t>::not_eof (const int_type& __c)
++static int_type
++not_eof(const int_type& __c)
+ {
+- return (__c == eof()) ? 0 : __c;
++ return eq_int_type(__c, eof()) ? static_cast<int_type>(0) : __c;
+ }
+
+-}
++}; //struct char_traits<ucs4_t>
++
++} //namespace std
++#endif
+ #endif
+
diff --git a/inputmethod/scim/patches/patch-ac b/inputmethod/scim/patches/patch-ac
new file mode 100644
index 00000000000..28b1c24b65d
--- /dev/null
+++ b/inputmethod/scim/patches/patch-ac
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.1.1.1 2009/11/24 11:46:01 obache Exp $
+
+--- extras/panel/scim_panel_gtk.cpp.orig 2008-11-02 06:43:13.000000000 +0000
++++ extras/panel/scim_panel_gtk.cpp
+@@ -464,7 +464,7 @@ static GdkColor _active_bg;
+ static GdkColor _active_text;
+
+ static ConfigModule *_config_module = 0;
+-static ConfigPointer _config;
++static ConfigPointer _config = ConfigPointer(0);
+
+ static guint _check_exit_timeout = 0;
+
diff --git a/inputmethod/scim/patches/patch-ad b/inputmethod/scim/patches/patch-ad
new file mode 100644
index 00000000000..bbe1275d316
--- /dev/null
+++ b/inputmethod/scim/patches/patch-ad
@@ -0,0 +1,13 @@
+$NetBSD: patch-ad,v 1.1.1.1 2009/11/24 11:46:01 obache Exp $
+
+--- modules/FrontEnd/scim_socket_frontend.cpp.orig 2008-11-02 06:42:11.000000000 +0000
++++ modules/FrontEnd/scim_socket_frontend.cpp
+@@ -51,7 +51,7 @@
+
+ using namespace scim;
+
+-static Pointer <SocketFrontEnd> _scim_frontend (0);
++static Pointer <SocketFrontEnd> _scim_frontend = Pointer<SocketFrontEnd>(0);
+
+ static int _argc;
+ static char **_argv;
diff --git a/inputmethod/scim/patches/patch-ae b/inputmethod/scim/patches/patch-ae
new file mode 100644
index 00000000000..50f55a07dcc
--- /dev/null
+++ b/inputmethod/scim/patches/patch-ae
@@ -0,0 +1,13 @@
+$NetBSD: patch-ae,v 1.1.1.1 2009/11/24 11:46:01 obache Exp $
+
+--- modules/FrontEnd/scim_x11_frontend.cpp.orig 2008-11-02 06:42:11.000000000 +0000
++++ modules/FrontEnd/scim_x11_frontend.cpp
+@@ -71,7 +71,7 @@
+ using namespace scim;
+
+ //Local static data
+-static Pointer <X11FrontEnd> _scim_frontend (0);
++static Pointer <X11FrontEnd> _scim_frontend = Pointer<X11FrontEnd>(0);
+
+ //Module Interface
+ extern "C" {
diff --git a/inputmethod/scim/patches/patch-af b/inputmethod/scim/patches/patch-af
new file mode 100644
index 00000000000..2752a04ac8d
--- /dev/null
+++ b/inputmethod/scim/patches/patch-af
@@ -0,0 +1,13 @@
+$NetBSD: patch-af,v 1.1.1.1 2009/11/24 11:46:01 obache Exp $
+
+--- modules/IMEngine/scim_rawcode_imengine.cpp.orig 2008-11-02 06:42:21.000000000 +0000
++++ modules/IMEngine/scim_rawcode_imengine.cpp
+@@ -48,7 +48,7 @@
+
+ using namespace scim;
+
+-static Pointer <RawCodeFactory> __rawcode_factory;
++static Pointer <RawCodeFactory> __rawcode_factory = Pointer<RawCodeFactory>(0);
+
+ static String __rawcode_locales;
+
diff --git a/inputmethod/scim/patches/patch-ag b/inputmethod/scim/patches/patch-ag
new file mode 100644
index 00000000000..b9ad9561d64
--- /dev/null
+++ b/inputmethod/scim/patches/patch-ag
@@ -0,0 +1,13 @@
+$NetBSD: patch-ag,v 1.1.1.1 2009/11/24 11:46:01 obache Exp $
+
+--- src/scim_config_base.cpp.orig 2008-11-02 06:42:34.000000000 +0000
++++ src/scim_config_base.cpp
+@@ -30,7 +30,7 @@
+
+ namespace scim {
+
+-ConfigPointer _scim_default_config (0);
++ConfigPointer _scim_default_config = ConfigPointer(0);
+ ConfigModule _scim_default_config_module;
+
+ static ConfigPointer
diff --git a/inputmethod/scim/patches/patch-ah b/inputmethod/scim/patches/patch-ah
new file mode 100644
index 00000000000..9202ec37947
--- /dev/null
+++ b/inputmethod/scim/patches/patch-ah
@@ -0,0 +1,156 @@
+$NetBSD: patch-ah,v 1.1.1.1 2009/11/24 11:46:01 obache Exp $
+
+--- src/scim_types.h.in.orig 2008-11-02 06:42:37.000000000 +0000
++++ src/scim_types.h.in
+@@ -31,13 +31,7 @@
+ #define __SCIM_TYPES_H
+
+ @INCLUDE_STDINT@
+-
+-#ifdef __FreeBSD__
+-# include <osreldate.h>
+-# if __FreeBSD_version > 500035
+-# define __STDC_ISO_10646__
+-# endif
+-#endif
++#include <string>
+
+ namespace scim {
+
+@@ -51,6 +45,136 @@ typedef @UINT64@ uint64;
+ typedef uint32 ucs4_t;
+ #endif
+
++} // namespace scim
++
++#ifndef __STDC_ISO_10646__
++#include <cstring>
++
++namespace std
++{
++
++template<>
++struct char_traits<scim::ucs4_t>
++{
++
++typedef scim::ucs4_t char_type;
++typedef scim::ucs4_t int_type;
++typedef streampos pos_type;
++typedef streamoff off_type;
++typedef mbstate_t state_type;
++
++static void
++assign(char_type& __c1, const char_type& __c2)
++{
++ __c1 = __c2;
++}
++
++static bool
++eq(const char_type& __c1, const char_type& __c2)
++{
++ return __c1 == __c2;
++}
++
++static bool
++lt(const char_type& __c1, const char_type& __c2)
++{
++ return __c1 < __c2;
++}
++
++static char_type*
++assign(char_type* __s, size_t __n, char_type __a)
++{
++ while (__n-- > 0)
++ assign(__s[__n], __a);
++ return __s;
++}
++
++static char_type*
++copy(char_type* __s1, const char_type* __s2, size_t __n)
++{
++ return static_cast<char_type *>
++ (memcpy(__s1, __s2, __n * sizeof(char_type)));
++}
++
++static char_type*
++move(char_type* __s1, const char_type* __s2, size_t __n)
++{
++ return static_cast<char_type *>
++ (memmove(__s1, __s2, __n * sizeof(char_type)));
++}
++
++static size_t
++length(const char_type* __s)
++{
++ const char_type *__p;
++
++ __p = __s;
++ while (eq(*__p, static_cast<int_type>(0)))
++ ++__p;
++ return static_cast<size_t>(__p - __s);
++}
++
++static int
++compare(const char_type* __s1, const char_type* __s2, size_t __n)
++{
++ size_t __i;
++
++ for (__i = 0; __i < __n; ++__i)
++ if (!eq(__s1[__i], __s2[__i]))
++ return lt(__s1[__i], __s2[__i]) ? -1 : 1;
++ return 0;
++}
++
++static const char_type*
++find(const char_type* __s, size_t __n, const char_type& __a)
++{
++ while (__n-- > 0) {
++ if (eq(*__s, __a))
++ return __s;
++ ++__s;
++ }
++ return 0;
++}
++
++static bool
++eq_int_type(const int_type& __c1, const int_type& __c2)
++{
++ return __c1 == __c2;
++}
++
++static char_type
++to_char_type(const int_type& __c)
++{
++ return static_cast<char_type>(__c);
++}
++
++static int_type
++to_int_type(const char_type& __c)
++{
++ return static_cast<int_type>(__c);
++}
++
++static int_type
++eof()
++{
++ return static_cast<int_type>(-1);
++}
++
++static int_type
++not_eof(const int_type& __c)
++{
++ return eq_int_type(__c, eof())
++ ? static_cast<int_type>(0) : __c;
++}
++
++}; // struct char_traits<scim::ucs4_t>
++
++} // namespace std
++
++#endif //!__STDC_ISO_10646__
++
++namespace scim {
++
+ typedef std::basic_string<char> String;
+ typedef std::basic_string<ucs4_t> WideString;
+
diff --git a/inputmethod/scim/patches/patch-bb b/inputmethod/scim/patches/patch-bb
new file mode 100644
index 00000000000..c6300a1261f
--- /dev/null
+++ b/inputmethod/scim/patches/patch-bb
@@ -0,0 +1,54 @@
+$NetBSD: patch-bb,v 1.1.1.1 2009/11/24 11:46:01 obache Exp $
+
+--- extras/gtk2_immodule/gtkimcontextscim.cpp.orig 2008-11-02 06:43:15.000000000 +0000
++++ extras/gtk2_immodule/gtkimcontextscim.cpp
+@@ -274,11 +274,11 @@ static int
+ static FrontEndHotkeyMatcher _frontend_hotkey_matcher;
+ static IMEngineHotkeyMatcher _imengine_hotkey_matcher;
+
+-static IMEngineInstancePointer _default_instance;
++static IMEngineInstancePointer _default_instance = IMEngineInstancePointer(0);
+
+ static ConfigModule *_config_module = 0;
+-static ConfigPointer _config;
+-static BackEndPointer _backend;
++static ConfigPointer _config = ConfigPointer(0);
++static BackEndPointer _backend = BackEndPointer(0);
+
+ static GtkIMContextSCIM *_focused_ic = 0;
+ static GtkWidget *_focused_widget = 0;
+@@ -296,8 +296,8 @@ static bool
+ static int _instance_count = 0;
+ static int _context_count = 0;
+
+-static IMEngineFactoryPointer _fallback_factory;
+-static IMEngineInstancePointer _fallback_instance;
++static IMEngineFactoryPointer _fallback_factory = IMEngineFactoryPointer(0);
++static IMEngineInstancePointer _fallback_instance = IMEngineInstancePointer(0);
+
+ static PanelClient _panel_client;
+
+@@ -310,6 +310,7 @@ static bool
+ static bool _shared_input_method = false;
+ static bool _use_key_snooper = true;
+
++#if 0
+ // A hack to shutdown the immodule cleanly even if im_module_exit () is not called when exiting.
+ class FinalizeHandler
+ {
+@@ -324,6 +325,7 @@ public:
+ };
+
+ static FinalizeHandler _finalize_handler;
++#endif
+
+ /* Function Implementations */
+
+@@ -436,6 +438,7 @@ gtk_im_context_scim_register_type (GType
+ sizeof (GtkIMContextSCIM),
+ 0,
+ (GtkObjectInitFunc) gtk_im_context_scim_init,
++ 0
+ };
+
+ SCIM_DEBUG_FRONTEND(1) << "gtk_im_context_scim_register_type...\n";
diff --git a/inputmethod/scim/patches/patch-bc b/inputmethod/scim/patches/patch-bc
new file mode 100644
index 00000000000..f3fc31f4266
--- /dev/null
+++ b/inputmethod/scim/patches/patch-bc
@@ -0,0 +1,20 @@
+$NetBSD: patch-bc,v 1.1.1.1 2009/11/24 11:46:01 obache Exp $
+
+--- utils/scimkeyselection.cpp.orig 2008-11-02 06:42:49.000000000 +0000
++++ utils/scimkeyselection.cpp
+@@ -79,6 +79,7 @@ scim_key_selection_register_type (GTypeM
+ sizeof (ScimKeySelection),
+ 0,
+ (GInstanceInitFunc) scim_key_selection_init,
++ 0
+ };
+
+ if (!key_selection_type) {
+@@ -608,6 +609,7 @@ scim_key_selection_dialog_register_type
+ sizeof (ScimKeySelectionDialog),
+ 0,
+ (GInstanceInitFunc) scim_key_selection_dialog_init,
++ 0
+ };
+
+ if (!key_selection_dialog_type) {
diff --git a/inputmethod/scim/patches/patch-bd b/inputmethod/scim/patches/patch-bd
new file mode 100644
index 00000000000..253e2cbcb94
--- /dev/null
+++ b/inputmethod/scim/patches/patch-bd
@@ -0,0 +1,12 @@
+$NetBSD: patch-bd,v 1.1.1.1 2009/11/24 11:46:01 obache Exp $
+
+--- utils/scimstringview.c.orig 2008-11-02 06:42:49.000000000 +0000
++++ utils/scimstringview.c
+@@ -134,6 +134,7 @@ scim_string_view_register_type (GTypeMod
+ sizeof (ScimStringView),
+ 0,
+ (GInstanceInitFunc) scim_string_view_init,
++ 0
+ };
+
+ if (!string_view_type)
diff --git a/inputmethod/scim/patches/patch-be b/inputmethod/scim/patches/patch-be
new file mode 100644
index 00000000000..e11a0897012
--- /dev/null
+++ b/inputmethod/scim/patches/patch-be
@@ -0,0 +1,14 @@
+$NetBSD: patch-be,v 1.1.1.1 2009/11/24 11:46:01 obache Exp $
+
+--- utils/scimtrayicon.c.orig 2008-11-02 06:42:49.000000000 +0000
++++ utils/scimtrayicon.c
+@@ -72,7 +72,8 @@ scim_tray_icon_get_type (void)
+ NULL, /* class_data */
+ sizeof (ScimTrayIcon),
+ 0, /* n_preallocs */
+- (GInstanceInitFunc) scim_tray_icon_init
++ (GInstanceInitFunc) scim_tray_icon_init,
++ 0
+ };
+ our_type = g_type_register_static (GTK_TYPE_PLUG, "ScimTrayIcon", &our_info, 0);
+ }