projects
/
dana
/
urxvt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
93ca25e
)
Simplify rxvt_temp_buf usage.
author
sf-exg
<sf-exg>
Sat, 30 Jan 2010 20:43:56 +0000
(20:43 +0000)
committer
sf-exg
<sf-exg>
Sat, 30 Jan 2010 20:43:56 +0000
(20:43 +0000)
src/main.C
patch
|
blob
|
history
src/rxvtfont.C
patch
|
blob
|
history
diff --git
a/src/main.C
b/src/main.C
index
9d8acc6
..
58c4a25
100644
(file)
--- a/
src/main.C
+++ b/
src/main.C
@@
-1167,7
+1167,7
@@
xim_preedit_draw (XIC ic, XPointer client_data, XIMPreeditDrawCallbackStruct *ca
if (text)
{
if (text)
{
-
void
*str;
+
wchar_t
*str;
if (!text->encoding_is_wchar && text->string.multi_byte)
{
if (!text->encoding_is_wchar && text->string.multi_byte)
{
@@
-1175,14
+1175,14
@@
xim_preedit_draw (XIC ic, XPointer client_data, XIMPreeditDrawCallbackStruct *ca
if (term->rs[Rs_imLocale])
SET_LOCALE (term->rs[Rs_imLocale]);
if (term->rs[Rs_imLocale])
SET_LOCALE (term->rs[Rs_imLocale]);
- str = rxvt_temp_buf
((text->length + 1) * sizeof (wchar_t)
);
- mbstowcs (
(wchar_t *)
str, text->string.multi_byte, text->length + 1);
+ str = rxvt_temp_buf
<wchar_t> (text->length + 1
);
+ mbstowcs (str, text->string.multi_byte, text->length + 1);
if (term->rs[Rs_imLocale])
SET_LOCALE (term->locale);
}
else
if (term->rs[Rs_imLocale])
SET_LOCALE (term->locale);
}
else
- str =
(void *)
text->string.wide_char;
+ str = text->string.wide_char;
HOOK_INVOKE ((term, HOOK_XIM_PREEDIT_DRAW,
DT_INT, call_data->caret,
HOOK_INVOKE ((term, HOOK_XIM_PREEDIT_DRAW,
DT_INT, call_data->caret,
diff --git
a/src/rxvtfont.C
b/src/rxvtfont.C
index
8f52614
..
a4dd1d6
100644
(file)
--- a/
src/rxvtfont.C
+++ b/
src/rxvtfont.C
@@
-1295,7
+1295,7
@@
rxvt_font_xft::draw (rxvt_drawable &d, int x, int y,
int fg, int bg)
{
XGlyphInfo extents;
int fg, int bg)
{
XGlyphInfo extents;
- XftGlyphSpec *enc =
(XftGlyphSpec *)rxvt_temp_buf (len * sizeof (XftGlyphSpec)
);
+ XftGlyphSpec *enc =
rxvt_temp_buf<XftGlyphSpec> (len
);
XftGlyphSpec *ep = enc;
dTermDisplay;
XftGlyphSpec *ep = enc;
dTermDisplay;