1 Index: Makefile.am |
|
2 =================================================================== |
|
3 RCS file: /cvsroot/scim-imengine/scim-anthy/Makefile.am,v |
|
4 retrieving revision 1.3 |
|
5 diff -u -p -r1.3 Makefile.am |
|
6 --- Makefile.am 19 Jan 2006 08:40:43 -0000 1.3 |
|
7 +++ Makefile.am 14 May 2007 07:57:51 -0000 |
|
8 @@ -15,8 +15,8 @@ |
|
9 ## along with this program; if not, write to the Free Software |
|
10 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
11 |
|
12 -SUBDIRS = intl po m4 src data |
|
13 +SUBDIRS = po src data |
|
14 |
|
15 -ACLOCAL_AMFLAGS = -I m4 |
|
16 +ACLOCAL_AMFLAGS = |
|
17 |
|
18 EXTRA_DIST = config.rpath |
|
19 Index: configure.ac |
|
20 =================================================================== |
|
21 RCS file: /cvsroot/scim-imengine/scim-anthy/configure.ac,v |
|
22 retrieving revision 1.27.2.2 |
|
23 diff -u -p -r1.27.2.2 configure.ac |
|
24 --- configure.ac 17 Apr 2007 06:41:38 -0000 1.27.2.2 |
|
25 +++ configure.ac 14 May 2007 07:57:51 -0000 |
|
26 @@ -25,7 +25,9 @@ AM_CONFIG_HEADER(config.h) |
|
27 |
|
28 # Init gettext |
|
29 ALL_LINGUAS="ja" |
|
30 -AM_GNU_GETTEXT |
|
31 +AM_GLIB_GNU_GETTEXT |
|
32 +LTLIBINTL= |
|
33 +AC_SUBST(LTLIBINTL) |
|
34 |
|
35 GETTEXT_PACKAGE=scim-anthy |
|
36 AC_SUBST(GETTEXT_PACKAGE) |
|
37 Index: src/scim_anthy_action.cpp |
|
38 =================================================================== |
|
39 RCS file: /cvsroot/scim-imengine/scim-anthy/src/scim_anthy_action.cpp,v |
|
40 retrieving revision 1.7 |
|
41 diff -u -p -r1.7 scim_anthy_action.cpp |
|
42 --- src/scim_anthy_action.cpp 13 Jul 2006 07:41:51 -0000 1.7 |
|
43 +++ src/scim_anthy_action.cpp 14 May 2007 07:57:53 -0000 |
|
44 @@ -21,6 +21,7 @@ |
|
45 #include <config.h> |
|
46 #endif |
|
47 |
|
48 +#include "scim_anthy_imengine.h" |
|
49 #include "scim_anthy_action.h" |
|
50 #include "scim_anthy_utils.h" |
|
51 |
|
52 Index: src/scim_anthy_conversion.cpp |
|
53 =================================================================== |
|
54 RCS file: /cvsroot/scim-imengine/scim-anthy/src/scim_anthy_conversion.cpp,v |
|
55 retrieving revision 1.40.2.1 |
|
56 diff -u -p -r1.40.2.1 scim_anthy_conversion.cpp |
|
57 --- src/scim_anthy_conversion.cpp 30 Oct 2006 05:13:09 -0000 1.40.2.1 |
|
58 +++ src/scim_anthy_conversion.cpp 14 May 2007 07:57:53 -0000 |
|
59 @@ -387,10 +387,11 @@ Conversion::get_segment_string (int segm |
|
60 } else { |
|
61 int len = anthy_get_segment (m_anthy_context, real_seg, cand, NULL, 0); |
|
62 if (len > 0) { |
|
63 - char buf[len + 1]; |
|
64 + char *buf = new char[len + 1]; |
|
65 anthy_get_segment (m_anthy_context, real_seg, cand, buf, len + 1); |
|
66 buf[len] = '\0'; |
|
67 m_iconv.convert (segment_str, buf, len); |
|
68 + delete[] buf; |
|
69 } |
|
70 } |
|
71 |
|
72 @@ -534,7 +535,7 @@ Conversion::get_candidates (CommonLookup |
|
73 if (len <= 0) |
|
74 continue; |
|
75 |
|
76 - char buf[len + 1]; |
|
77 + char *buf = new char[len + 1]; |
|
78 anthy_get_prediction (m_anthy_context, i, buf, len + 1); |
|
79 buf[len] = '\0'; |
|
80 |
|
81 @@ -542,6 +543,7 @@ Conversion::get_candidates (CommonLookup |
|
82 m_iconv.convert (cand, buf); |
|
83 |
|
84 table.append_candidate (cand); |
|
85 + delete[] buf; |
|
86 } |
|
87 #endif /* HAS_ANTHY_PREDICTION */ |
|
88 } else if (is_converting ()) { |
|
89 @@ -571,7 +573,7 @@ Conversion::get_candidates (CommonLookup |
|
90 if (len <= 0) |
|
91 continue; |
|
92 |
|
93 - char buf[len + 1]; |
|
94 + char *buf = new char[len + 1]; |
|
95 anthy_get_segment (m_anthy_context, real_segment_id, |
|
96 i, buf, len + 1); |
|
97 |
|
98 @@ -579,6 +581,7 @@ Conversion::get_candidates (CommonLookup |
|
99 m_iconv.convert (cand_wide, buf, len); |
|
100 |
|
101 table.append_candidate (cand_wide); |
|
102 + delete[] buf; |
|
103 } |
|
104 |
|
105 table.set_cursor_pos (get_selected_candidate ()); |
|
106 @@ -800,12 +803,13 @@ Conversion::get_prediction_string (int c |
|
107 if (len <= 0) |
|
108 return WideString (); |
|
109 |
|
110 - char buf[len + 1]; |
|
111 + char *buf = new char[len + 1]; |
|
112 anthy_get_prediction (m_anthy_context, candidate_id, buf, len + 1); |
|
113 buf[len] = '\0'; |
|
114 |
|
115 WideString cand; |
|
116 m_iconv.convert (cand, buf); |
|
117 + delete[] buf; |
|
118 |
|
119 return cand; |
|
120 #else /* HAS_ANTHY_PREDICTION */ |
|
121 Index: src/scim_anthy_table_editor.cpp |
|
122 =================================================================== |
|
123 RCS file: /cvsroot/scim-imengine/scim-anthy/src/scim_anthy_table_editor.cpp,v |
|
124 retrieving revision 1.7 |
|
125 diff -u -p -r1.7 scim_anthy_table_editor.cpp |
|
126 --- src/scim_anthy_table_editor.cpp 4 Oct 2005 10:28:51 -0000 1.7 |
|
127 +++ src/scim_anthy_table_editor.cpp 14 May 2007 07:57:54 -0000 |
|
128 @@ -205,7 +205,7 @@ scim_anthy_table_editor_set_columns (Sci |
|
129 if (n_cols <= 0) |
|
130 return; |
|
131 |
|
132 - GType types[n_cols]; |
|
133 + GType *types = new GType[n_cols]; |
|
134 for (gint i = 0; i < n_cols; i++) |
|
135 types[i] = G_TYPE_STRING; |
|
136 |
|
137 @@ -276,6 +276,7 @@ scim_anthy_table_editor_set_columns (Sci |
|
138 |
|
139 // clean |
|
140 g_object_unref (store); |
|
141 + delete[] types; |
|
142 } |
|
143 |
|
144 const char * |
|
145 Index: src/scim_anthy_utils.cpp |
|
146 =================================================================== |
|
147 RCS file: /cvsroot/scim-imengine/scim-anthy/src/scim_anthy_utils.cpp,v |
|
148 retrieving revision 1.8.4.1 |
|
149 diff -u -p -r1.8.4.1 scim_anthy_utils.cpp |
|
150 --- src/scim_anthy_utils.cpp 6 Jan 2007 00:54:06 -0000 1.8.4.1 |
|
151 +++ src/scim_anthy_utils.cpp 14 May 2007 07:57:54 -0000 |
|
152 @@ -275,7 +275,7 @@ util_launch_program (const char *command |
|
153 |
|
154 /* split string */ |
|
155 unsigned int len = strlen (command); |
|
156 - char tmp[len + 1]; |
|
157 + char *tmp = new char[len + 1]; |
|
158 strncpy (tmp, command, len); |
|
159 tmp[len] = '\0'; |
|
160 |
|
161 @@ -295,7 +295,7 @@ util_launch_program (const char *command |
|
162 if (array.size () <= 0) return; |
|
163 array.push_back (NULL); |
|
164 |
|
165 - char *args[array.size()]; |
|
166 + char **args = new char*[array.size()]; |
|
167 for (unsigned int i = 0; i < array.size (); i++) |
|
168 args[i] = array[i]; |
|
169 |
|
170 @@ -324,6 +324,9 @@ util_launch_program (const char *command |
|
171 int status; |
|
172 waitpid(child_pid, &status, 0); |
|
173 } |
|
174 + |
|
175 + delete[] tmp; |
|
176 + delete[] args; |
|
177 } |
|
178 |
|
179 } |
|