Mon Jun 25 17:59:50 2001 Michael Jennings (mej)
This takes care of Debian bug #101777. Somebody was bitching that the 0-15 colors could no longer be used as values for the -f/-b/-c/etc. options. I don't remember that ever being a feature to begin with, but it took me all of 5 minutes to make it happen, so I figure what the hell. Here ya go. SVN revision: 4858
This commit is contained in:
parent
afc51e774a
commit
d034d34ab7
|
@ -4268,3 +4268,11 @@ And finally, I added the kill() function to the script language. At
|
|||
this point it can only take signals as numbers, but that's good enough
|
||||
for now.
|
||||
----------------------------------------------------------------------
|
||||
Mon Jun 25 17:59:50 2001 Michael Jennings (mej)
|
||||
|
||||
This takes care of Debian bug #101777. Somebody was bitching that the
|
||||
0-15 colors could no longer be used as values for the -f/-b/-c/etc.
|
||||
options. I don't remember that ever being a feature to begin with,
|
||||
but it took me all of 5 minutes to make it happen, so I figure what
|
||||
the hell. Here ya go.
|
||||
----------------------------------------------------------------------
|
||||
|
|
|
@ -191,6 +191,13 @@ get_color_by_name(const char *name, const char *fallback)
|
|||
} else {
|
||||
name = fallback;
|
||||
}
|
||||
} else if (isdigit(*name)) {
|
||||
unsigned long c;
|
||||
|
||||
c = strtoul(name, (char **) NULL, 0);
|
||||
if (c <= 15) {
|
||||
name = rs_color[c + minColor];
|
||||
}
|
||||
}
|
||||
if (!XParseColor(Xdisplay, cmap, name, &xcol)) {
|
||||
print_warning("Unable to resolve \"%s\" as a color name. Falling back on \"%s\".\n", name, NONULL(fallback));
|
||||
|
|
Loading…
Reference in New Issue