]> git.mdlowis.com Git - proto/iwe.git/commitdiff
remove alt colors
authorMichael D. Lowis <mike@mdlowis.com>
Fri, 9 Mar 2018 00:20:44 +0000 (19:20 -0500)
committerMichael D. Lowis <mike@mdlowis.com>
Fri, 9 Mar 2018 00:20:44 +0000 (19:20 -0500)
st/st.c

diff --git a/st/st.c b/st/st.c
index a4ce2e07e05ce05681dce5f23f4aba64a58ad791..5e386b0a7faaac8a72535c0dedbd564f515543f8 100644 (file)
--- 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;