ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvttoolkit.C
(Generate patch)

Comparing rxvt-unicode/src/rxvttoolkit.C (file contents):
Revision 1.70 by sasha, Thu Jul 12 22:33:16 2007 UTC vs.
Revision 1.71 by sasha, Fri Aug 17 22:01:33 2007 UTC

743 name += skip; 743 name += skip;
744 } 744 }
745 else 745 else
746 c.a = rgba::MAX_CC; 746 c.a = rgba::MAX_CC;
747 747
748 // parse the non-standard "#aarrggbb" format
749 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))
750 {
751 if (c.r)
752 c.r = (c.r << 8) | 0x0ff;
753 if (c.g)
754 c.g = (c.g << 8) | 0x0ff;
755 if (c.b)
756 c.b = (c.b << 8) | 0x0ff;
757 if (c.a)
758 c.a = (c.a << 8) | 0x0ff;
759 }
748 // parse the non-standard "rgba:rrrr/gggg/bbbb/aaaa" format 760 // parse the non-standard "rgba:rrrr/gggg/bbbb/aaaa" format
749 if (strlen (name) != 4+5*4 || 4 != sscanf (name, "rgba:%4hx/%4hx/%4hx/%4hx%c", &c.r, &c.g, &c.b, &c.a, &eos)) 761 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))
750 { 762 {
751 XColor xc, xc_exact; 763 XColor xc, xc_exact;
752 764
753 if (XParseColor (screen->dpy, screen->cmap, name, &xc)) 765 if (XParseColor (screen->dpy, screen->cmap, name, &xc))
754 { 766 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines