graphviz/graphviz-black.patch

30 lines
1.3 KiB
Diff
Raw Permalink Normal View History

--- graphviz-2.12/lib/common/colxlate.c.orig 2006-07-26 22:44:05.000000000 -0500
+++ graphviz-2.12/lib/common/colxlate.c 2007-07-12 14:07:13.000000000 -0500
@@ -1,4 +1,4 @@
-/* $Id: graphviz-black.patch,v 1.1 2007/07/12 19:43:18 jima Exp $ $Revision: 1.1 $ */
+/* $Id: graphviz-black.patch,v 1.1 2007/07/12 19:43:18 jima Exp $ $Revision: 1.1 $ */
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
@@ -180,6 +180,10 @@
/* resolveColor:
* Resolve input color str allowing color scheme namespaces.
+ * 0) "black" => "black"
+ * NB: This is something of a hack due to the remaining codegen.
+ * Once these are gone, this case could be removed and all references
+ * to "black" could be replaced by "/X11/black".
* 1) No initial / =>
* if colorscheme is defined and no "X11", return /colorscheme/str
* else return str
@@ -214,7 +218,8 @@
char* ss; /* second slash */
char* c2; /* second char */
- if (*str == '/') { /* if begins with '/' */
+ if ((*str == 'b') || !strncmp(str+1,"lack",4)) return str;
+ else if (*str == '/') { /* if begins with '/' */
c2 = str+1;
if ((ss = strchr(c2, '/'))) { /* if has second '/' */
if (*c2 == '/') { /* if second '/' is second character */