ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/main.C
(Generate patch)

Comparing rxvt-unicode/src/main.C (file contents):
Revision 1.319 by sf-exg, Sun Jan 24 21:53:13 2010 UTC vs.
Revision 1.320 by sf-exg, Sat Jan 30 20:43:56 2010 UTC

1165 1165
1166 term->make_current (); 1166 term->make_current ();
1167 1167
1168 if (text) 1168 if (text)
1169 { 1169 {
1170 void *str; 1170 wchar_t *str;
1171 1171
1172 if (!text->encoding_is_wchar && text->string.multi_byte) 1172 if (!text->encoding_is_wchar && text->string.multi_byte)
1173 { 1173 {
1174 // of course, X makes it ugly again 1174 // of course, X makes it ugly again
1175 if (term->rs[Rs_imLocale]) 1175 if (term->rs[Rs_imLocale])
1176 SET_LOCALE (term->rs[Rs_imLocale]); 1176 SET_LOCALE (term->rs[Rs_imLocale]);
1177 1177
1178 str = rxvt_temp_buf ((text->length + 1) * sizeof (wchar_t)); 1178 str = rxvt_temp_buf<wchar_t> (text->length + 1);
1179 mbstowcs ((wchar_t *)str, text->string.multi_byte, text->length + 1); 1179 mbstowcs (str, text->string.multi_byte, text->length + 1);
1180 1180
1181 if (term->rs[Rs_imLocale]) 1181 if (term->rs[Rs_imLocale])
1182 SET_LOCALE (term->locale); 1182 SET_LOCALE (term->locale);
1183 } 1183 }
1184 else 1184 else
1185 str = (void *)text->string.wide_char; 1185 str = text->string.wide_char;
1186 1186
1187 HOOK_INVOKE ((term, HOOK_XIM_PREEDIT_DRAW, 1187 HOOK_INVOKE ((term, HOOK_XIM_PREEDIT_DRAW,
1188 DT_INT, call_data->caret, 1188 DT_INT, call_data->caret,
1189 DT_INT, call_data->chg_first, 1189 DT_INT, call_data->chg_first,
1190 DT_INT, call_data->chg_length, 1190 DT_INT, call_data->chg_length,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines