return x == 0 ? 0 : 0x3737 + 0x2828 * x;
}
-const char* getcolorname(int i)
-{
- return (usealtcolors) ? altcolorname[i] : colorname[i];
-}
-
int
xloadcolor(int i, const char *name, Color *ncolor)
{
return XftColorAllocValue(xw.dpy, xw.vis,
xw.cmap, &color, ncolor);
} else
- name = getcolorname(i);
+ name = colorname[i];
}
return XftColorAllocName(xw.dpy, xw.vis, xw.cmap, name, ncolor);
for (i = 0; i < LEN(dc.col); i++)
if (!xloadcolor(i, NULL, &dc.col[i])) {
- if (getcolorname(i))
- die("Could not allocate color '%s'\n", getcolorname(i));
+ if (colorname[i])
+ die("Could not allocate color '%s'\n", colorname[i]);
else
die("Could not allocate color %d\n", i);
}
cursor = XCreateFontCursor(xw.dpy, mouseshape);
XDefineCursor(xw.dpy, xw.win, cursor);
- if (XParseColor(xw.dpy, xw.cmap, getcolorname(mousefg), &xmousefg) == 0) {
+ if (XParseColor(xw.dpy, xw.cmap, colorname[mousefg], &xmousefg) == 0) {
xmousefg.red = 0xffff;
xmousefg.green = 0xffff;
xmousefg.blue = 0xffff;
}
- if (XParseColor(xw.dpy, xw.cmap, getcolorname(mousebg), &xmousebg) == 0) {
+ if (XParseColor(xw.dpy, xw.cmap, colorname[mousebg], &xmousebg) == 0) {
xmousebg.red = 0x0000;
xmousebg.green = 0x0000;
xmousebg.blue = 0x0000;