From 890b5b05cd043017946bfd56d0b25a4995d84c24 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 23 Jan 2008 09:23:39 +0000 Subject: [PATCH] removed undocumented #aarrggbb format, it was never documented, and i don't see the point --- src/rxvttoolkit.C | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/rxvttoolkit.C b/src/rxvttoolkit.C index 3d6f39de..da7e2a94 100644 --- a/src/rxvttoolkit.C +++ b/src/rxvttoolkit.C @@ -742,25 +742,17 @@ rxvt_color::set (rxvt_screen *screen, const char *name) char eos; int skip; + c.a = rgba::MAX_CC; + // parse the nonstandard "[alphapercent]" prefix if (1 <= sscanf (name, "[%hd]%n", &c.a, &skip)) { c.a = lerp (0, rgba::MAX_CC, c.a); name += skip; } - else - c.a = rgba::MAX_CC; - // parse the non-standard "#aarrggbb" format - if (name[0] == '#' && strlen (name) == 1+2+2+2+2 && 4 == sscanf (name+1, "%2hx%2hx%2hx%2hx%c", &c.a, &c.r, &c.g, &c.b, &eos)) - { - c.r <<= 8; - c.g <<= 8; - c.b <<= 8; - c.a <<= 8; - } // parse the non-standard "rgba:rrrr/gggg/bbbb/aaaa" format - else if (strlen (name) != 4+5*4 || 4 != sscanf (name, "rgba:%4hx/%4hx/%4hx/%4hx%c", &c.r, &c.g, &c.b, &c.a, &eos)) + if (strlen (name) != 4+5*4 || 4 != sscanf (name, "rgba:%4hx/%4hx/%4hx/%4hx%c", &c.r, &c.g, &c.b, &c.a, &eos)) { XColor xc; -- 2.34.1