From: Michael D. Lowis Date: Fri, 9 Mar 2018 00:20:44 +0000 (-0500) Subject: remove alt colors X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=4d4fa14f8be6056148be45fe9004dc9a92b6b7ca;p=proto%2Fiwe.git remove alt colors --- diff --git a/st/st.c b/st/st.c index a4ce2e0..5e386b0 100644 --- a/st/st.c +++ b/st/st.c @@ -3233,11 +3233,6 @@ sixd_to_16bit(int x) 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) { @@ -3256,7 +3251,7 @@ 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); @@ -3276,8 +3271,8 @@ xloadcols(void) 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); } @@ -3604,13 +3599,13 @@ xinit(void) 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;