+ fixed scx_XftColorAllocName

This commit is contained in:
eknauel 2003-10-23 17:17:09 +00:00
parent ada7af2ab3
commit 1b11d5d07c
1 changed files with 7 additions and 5 deletions

View File

@ -171,6 +171,7 @@ s48_value scx_XftFontOpenName(s48_value sdpy, s48_value sscreenno, s48_value sna
S48_GC_PROTECT_3(sdpy, sscreenno, sname); S48_GC_PROTECT_3(sdpy, sscreenno, sname);
xf = XftFontOpenName(scx_extract_display(sdpy), s48_extract_integer(sscreenno), xf = XftFontOpenName(scx_extract_display(sdpy), s48_extract_integer(sscreenno),
s48_extract_string(sname)); s48_extract_string(sname));
XftPatternPrint(xf->pattern);
S48_GC_UNPROTECT(); S48_GC_UNPROTECT();
return scx_enter_xftfont(xf); return scx_enter_xftfont(xf);
} }
@ -402,14 +403,15 @@ s48_value scx_XftColorAllocName(s48_value sdpy, s48_value svisual,
s48_value scolormap, s48_value sname) s48_value scolormap, s48_value sname)
{ {
s48_value res = S48_FALSE; s48_value res = S48_FALSE;
XftColor *xftcolor = NULL; XftColor *xftcolor;
Bool b; Bool b = False;
S48_DECLARE_GC_PROTECT(5); S48_DECLARE_GC_PROTECT(5);
S48_GC_PROTECT_5(res, sdpy, svisual, scolormap, sname); S48_GC_PROTECT_5(res, sdpy, svisual, scolormap, sname);
b = XftColorAllocName(scx_extract_display(sdpy), scx_extract_visual(svisual), if ((xftcolor = (XftColor *) calloc(1, sizeof(XftColor))) != NULL)
scx_extract_colormap(scolormap), s48_extract_string(sname), b = XftColorAllocName(scx_extract_display(sdpy), scx_extract_visual(svisual),
xftcolor); scx_extract_colormap(scolormap), s48_extract_string(sname),
xftcolor);
res = s48_list_2(b ? S48_TRUE : S48_FALSE, res = s48_list_2(b ? S48_TRUE : S48_FALSE,
b ? scx_enter_xftcolor(xftcolor) : S48_FALSE); b ? scx_enter_xftcolor(xftcolor) : S48_FALSE);
S48_GC_UNPROTECT(); S48_GC_UNPROTECT();