Author: rjek
Date: Wed Jul 18 15:49:26 2007
New Revision: 3432
URL:
http://source.netsurf-browser.org?rev=3432&view=rev
Log:
Wrap internal SVG renderer with appropriate #ifdef WITH_NS_SVG
Modified:
trunk/netsurf/content/content.c
trunk/netsurf/content/content.h
trunk/netsurf/content/content_type.h
trunk/netsurf/image/svg.c
trunk/netsurf/utils/config.h
Modified: trunk/netsurf/content/content.c
URL:
http://source.netsurf-browser.org/trunk/netsurf/content/content.c?rev=343...
==============================================================================
--- trunk/netsurf/content/content.c (original)
+++ trunk/netsurf/content/content.c Wed Jul 18 15:49:26 2007
@@ -43,7 +43,9 @@
#include "image/bmp.h"
#include "image/ico.h"
#endif
+#ifdef WITH_NS_SVG
#include "image/svg.h"
+#endif
#ifdef WITH_SPRITE
#include "riscos/sprite.h"
#endif
@@ -134,8 +136,10 @@
#ifdef WITH_MNG
{"image/png", CONTENT_PNG},
#endif
+#ifdef WITH_NS_SVG
{"image/svg", CONTENT_SVG},
{"image/svg+xml", CONTENT_SVG},
+#endif
#ifdef WITH_BMP
{"image/x-bitmap", CONTENT_BMP},
{"image/x-bmp", CONTENT_BMP},
@@ -302,8 +306,10 @@
{0, 0, artworks_convert,
0, artworks_destroy, 0, artworks_redraw, 0, 0, 0, false},
#endif
+#ifdef WITH_NS_SVG
{svg_create, 0, svg_convert,
0, svg_destroy, 0, svg_redraw, 0, 0, 0, false},
+#endif
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, false}
};
#define HANDLER_MAP_COUNT (sizeof(handler_map) / sizeof(handler_map[0]))
Modified: trunk/netsurf/content/content.h
URL:
http://source.netsurf-browser.org/trunk/netsurf/content/content.h?rev=343...
==============================================================================
--- trunk/netsurf/content/content.h (original)
+++ trunk/netsurf/content/content.h Wed Jul 18 15:49:26 2007
@@ -46,7 +46,9 @@
#ifdef WITH_ARTWORKS
#include "riscos/artworks.h"
#endif
+#ifdef WITH_NS_SVG
#include "image/svg.h"
+#endif
struct bitmap;
@@ -166,7 +168,9 @@
#ifdef WITH_ARTWORKS
struct content_artworks_data artworks;
#endif
+#ifdef WITH_NS_SVG
struct content_svg_data svg;
+#endif
} data;
/**< URL for refresh request, in standard form as from url_join. */
Modified: trunk/netsurf/content/content_type.h
URL:
http://source.netsurf-browser.org/trunk/netsurf/content/content_type.h?re...
==============================================================================
--- trunk/netsurf/content/content_type.h (original)
+++ trunk/netsurf/content/content_type.h Wed Jul 18 15:49:26 2007
@@ -53,7 +53,9 @@
#ifdef WITH_ARTWORKS
CONTENT_ARTWORKS,
#endif
+#ifdef WITH_NS_SVG
CONTENT_SVG,
+#endif
/* these must be the last two */
CONTENT_OTHER,
CONTENT_UNKNOWN /**< content-type not received yet */
Modified: trunk/netsurf/image/svg.c
URL:
http://source.netsurf-browser.org/trunk/netsurf/image/svg.c?rev=3432&...
==============================================================================
--- trunk/netsurf/image/svg.c (original)
+++ trunk/netsurf/image/svg.c Wed Jul 18 15:49:26 2007
@@ -14,9 +14,10 @@
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
+#include "utils/config.h"
+#ifdef WITH_NS_SVG
#include <libxml/parser.h>
#include <libxml/debugXML.h>
-#include "utils/config.h"
#include "content/content.h"
#include "css/css.h"
#include "desktop/plotters.h"
@@ -676,3 +677,5 @@
if (c->data.svg.doc)
xmlFreeDoc(c->data.svg.doc);
}
+
+#endif /* WITH_NS_SVG */
Modified: trunk/netsurf/utils/config.h
URL:
http://source.netsurf-browser.org/trunk/netsurf/utils/config.h?rev=3432&a...
==============================================================================
--- trunk/netsurf/utils/config.h (original)
+++ trunk/netsurf/utils/config.h Wed Jul 18 15:49:26 2007
@@ -39,6 +39,7 @@
#define WITH_JPEG
#define WITH_MNG
#define WITH_GIF
+#define WITH_NS_SVG /* internal SVG renderer */
#if defined(riscos) || defined(ncos)
#define WITH_DRAW
#define WITH_SPRITE