[cairo] a patch for libsvg-0.1.4

Shigeharu TAKENO shige at iee.niit.ac.jp
Sat Mar 1 23:22:17 PST 2008


shige 03/02 2008
----------------

I will send a patch for libsvg-0.1.4. This fixes the following 
two problems.

1) Solaris (9) doesn't have stdint.h but have inttypes.h. 
configure script check it, but src/svg_ascii.h is not support it.

2) The function _svg_color_init_from_str() in src/svg_color.c can
not search color names "green", "greenyellow" and 
"mediumnightblue" since the table SVG_COLOR_MAP[] is not sorted 
by colornames. The table needs to be sorted for the function 
bsearch().

----- From here -----
diff -uN libsvg-0.1.4/src/svg_ascii.h.ORG libsvg-0.1.4/src/svg_ascii.h
--- libsvg-0.1.4/src/svg_ascii.h.ORG	Tue Apr 12 00:32:28 2005
+++ libsvg-0.1.4/src/svg_ascii.h	Tue Feb 19 12:50:25 2008
@@ -32,7 +32,11 @@
 #define SVG_ASCII_H
 
 #include <stdio.h>
-#include <stdint.h>
+#if HAVE_STDINT_H
+# include <stdint.h>
+#elif HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
 
 /* Functions like the ones in <ctype.h> that are not affected by locale. */
 typedef enum {
diff -uN libsvg-0.1.4/src/svg_color.c.ORG libsvg-0.1.4/src/svg_color.c
--- libsvg-0.1.4/src/svg_color.c.ORG	Sat Jun  5 01:21:01 2004
+++ libsvg-0.1.4/src/svg_color.c	Tue Feb 19 12:52:32 2008
@@ -100,9 +100,9 @@
     { "gold",                 { 0, PACK_RGB (215,215,  0) }},
     { "goldenrod",            { 0, PACK_RGB (218,165, 32) }},
     { "gray",                 { 0, PACK_RGB (128,128,128) }},
-    { "grey",                 { 0, PACK_RGB (128,128,128) }},
     { "green",                { 0, PACK_RGB (  0,128,  0) }},
     { "greenyellow",          { 0, PACK_RGB (173,255, 47) }},
+    { "grey",                 { 0, PACK_RGB (128,128,128) }},
     { "honeydew",             { 0, PACK_RGB (240,255,240) }},
     { "hotpink",              { 0, PACK_RGB (255,105,180) }},
     { "indianred",            { 0, PACK_RGB (205, 92, 92) }},
@@ -135,6 +135,7 @@
     { "maroon",               { 0, PACK_RGB (128,  0,  0) }},
     { "mediumaquamarine",     { 0, PACK_RGB (102,205,170) }},
     { "mediumblue",           { 0, PACK_RGB (  0,  0,205) }},
+    { "mediumnightblue",      { 0, PACK_RGB ( 25, 25,112) }},
     { "mediumorchid",         { 0, PACK_RGB (186, 85,211) }},
     { "mediumpurple",         { 0, PACK_RGB (147,112,219) }},
     { "mediumseagreen",       { 0, PACK_RGB ( 60,179,113) }},
@@ -142,7 +143,6 @@
     { "mediumspringgreen",    { 0, PACK_RGB (  0,250,154) }},
     { "mediumturquoise",      { 0, PACK_RGB ( 72,209,204) }},
     { "mediumvioletred",      { 0, PACK_RGB (199, 21,133) }},
-    { "mediumnightblue",      { 0, PACK_RGB ( 25, 25,112) }},
     { "mintcream",            { 0, PACK_RGB (245,255,250) }},
     { "mintyrose",            { 0, PACK_RGB (255,228,225) }},
     { "moccasin",             { 0, PACK_RGB (255,228,181) }},
----- To here -----

+========================================================+
 Shigeharu TAKENO     NIigata Institute of Technology
                       kashiwazaki,Niigata 945-1195 JAPAN
 shige at iee.niit.ac.jp   TEL(&FAX): +81-257-22-8161
+========================================================+


More information about the cairo mailing list