summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1105c28)
raw | patch | inline | side by side (parent: 1105c28)
author | pjrm <pjrm@users.sourceforge.net> | |
Mon, 13 Mar 2006 03:27:43 +0000 (03:27 +0000) | ||
committer | pjrm <pjrm@users.sourceforge.net> | |
Mon, 13 Mar 2006 03:27:43 +0000 (03:27 +0000) |
svg/svg.h: Temporarily #include svg-color.h.
src/svg/Makefile_insert | patch | blob | history | |
src/svg/svg-color.cpp | patch | blob | history | |
src/svg/svg-color.h | [new file with mode: 0644] | patch | blob |
src/svg/svg.h | patch | blob | history |
index f76abb0eb3466263016555695ab47fe31e9c343a..c3219d70524549bfdfea42879276310f05ccfaf3 100644 (file)
--- a/src/svg/Makefile_insert
+++ b/src/svg/Makefile_insert
svg/strip-trailing-zeros.cpp \
svg/svg-affine.cpp \
svg/svg-color.cpp \
+ svg/svg-color.h \
svg/svg-length.cpp \
svg/svg-length.h \
svg/svg-path.cpp \
diff --git a/src/svg/svg-color.cpp b/src/svg/svg-color.cpp
index 613d97c0b4e46cda317bcb2d0ac44919ce42dc40..89c273fe57e7dee37b06e4aa5f66ce6772129b52 100644 (file)
--- a/src/svg/svg-color.cpp
+++ b/src/svg/svg-color.cpp
# include "config.h"
#endif
+#include "svg-color.h"
#include <math.h>
#include <glib/gmessages.h>
#include <glib/gstrfuncs.h>
#include <glib/ghash.h>
#include <glib/gutils.h>
-
-#include "svg.h"
+#include "strneq.h"
struct SPSVGColor {
unsigned long rgb;
/* must be either 3 or 6 digits. */
return def;
}
- } else if (!strncmp(str, "rgb(", 4)) {
+ } else if (strneq(str, "rgb(", 4)) {
gboolean hasp, hasd;
gchar *s, *e;
gdouble r, g, b;
diff --git a/src/svg/svg-color.h b/src/svg/svg-color.h
--- /dev/null
+++ b/src/svg/svg-color.h
@@ -0,0 +1,10 @@
+#ifndef SVG_SVG_COLOR_H_SEEN
+#define SVG_SVG_COLOR_H_SEEN
+
+#include <glib/gtypes.h>
+
+unsigned int sp_svg_read_color(gchar const *str, unsigned int dfl);
+int sp_svg_write_color(char *buf, unsigned buflen, unsigned int color);
+
+
+#endif /* !SVG_SVG_COLOR_H_SEEN */
diff --git a/src/svg/svg.h b/src/svg/svg.h
index 15d4f39a9e0f2cb06272ef226d35beebf173b644..c79ff274e5999d845f4a6d5aa563de93ccfded8c 100644 (file)
--- a/src/svg/svg.h
+++ b/src/svg/svg.h
*/
#include <glib/gtypes.h>
#include "svg/svg-length.h"
+#include "svg/svg-color.h"
#include <vector>
struct NArtBpath;
double sp_svg_read_percentage (const char * str, double def);
-unsigned int sp_svg_read_color (const gchar * str, unsigned int def);
-int sp_svg_write_color(char *buf, unsigned buflen, unsigned int color);
-
/* NB! As paths can be long, we use here dynamic string */
NArtBpath * sp_svg_read_path (const char * str);