[114618] trunk/dports/graphics/inkscape
devans at macports.org
devans at macports.org
Wed Dec 11 15:56:18 PST 2013
Revision: 114618
https://trac.macports.org/changeset/114618
Author: devans at macports.org
Date: 2013-12-11 15:56:18 -0800 (Wed, 11 Dec 2013)
Log Message:
-----------
inkscape: patch to bzr 10003, a number of bug fixes backported from inkscape trunk.
Modified Paths:
--------------
trunk/dports/graphics/inkscape/Portfile
Added Paths:
-----------
trunk/dports/graphics/inkscape/files/patch-r9972-thru-r10003.diff
Removed Paths:
-------------
trunk/dports/graphics/inkscape/files/patch-r9972-thru-r9989.diff
Modified: trunk/dports/graphics/inkscape/Portfile
===================================================================
--- trunk/dports/graphics/inkscape/Portfile 2013-12-11 23:52:13 UTC (rev 114617)
+++ trunk/dports/graphics/inkscape/Portfile 2013-12-11 23:56:18 UTC (rev 114618)
@@ -6,7 +6,7 @@
name inkscape
conflicts inkscape-devel
version 0.48.4
-revision 21
+revision 22
license GPL-2 LGPL-2.1
maintainers devans
categories graphics gnome
@@ -48,7 +48,7 @@
port:gtkspell2
patchfiles patch-thru-r9971.diff \
- patch-r9972-thru-r9989.diff \
+ patch-r9972-thru-r10003.diff \
patch-python-configure.ac.diff
variant python26 conflicts python27 description {Configure to use Python version 2.6} {
Added: trunk/dports/graphics/inkscape/files/patch-r9972-thru-r10003.diff
===================================================================
--- trunk/dports/graphics/inkscape/files/patch-r9972-thru-r10003.diff (rev 0)
+++ trunk/dports/graphics/inkscape/files/patch-r9972-thru-r10003.diff 2013-12-11 23:56:18 UTC (rev 114618)
@@ -0,0 +1,2121 @@
+=== modified file 'configure.ac'
+--- configure.ac 2013-09-22 00:34:02 +0000
++++ configure.ac 2013-11-19 23:57:37 +0000
+@@ -168,11 +168,14 @@
+ dnl Check for OpenMP
+ dnl Replace this with AC_OPENMP once Autoconf 2.62 is widespread
+ dnl ******************************
+-AX_OPENMP([openmp_ok=yes],[openmp_ok=no])
++AX_OPENMP([AC_CHECK_HEADER([omp.h],
++ [openmp_ok=yes],
++ [openmp_ok=no])
++])
++
+ if test "x$openmp_ok" = "xyes"; then
+ dnl We have it, now set up the flags
+ CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
+- AC_CHECK_HEADER(omp.h)
+ AC_DEFINE(HAVE_OPENMP, 1, [Use OpenMP])
+ fi
+
+
+=== modified file 'share/extensions/dxf_outlines.py'
+--- share/extensions/dxf_outlines.py 2012-12-12 15:40:23 +0000
++++ share/extensions/dxf_outlines.py 2013-12-11 17:05:09 +0000
+@@ -88,12 +88,13 @@
+ self.poly = [csp[0]] # initiallize new polyline
+ self.color_LWPOLY = self.color
+ self.layer_LWPOLY = self.layer
++ self.closed_LWPOLY = self.closed
+ self.poly.append(csp[1])
+ def LWPOLY_output(self):
+ if len(self.poly) == 1:
+ return
+ self.handle += 1
+- self.dxf_add(" 0\nLWPOLYLINE\n 5\n%x\n100\nAcDbEntity\n 8\n%s\n 62\n%d\n100\nAcDbPolyline\n 90\n%d\n 70\n0\n" % (self.handle, self.layer_LWPOLY, self.color_LWPOLY, len(self.poly)))
++ self.dxf_add(" 0\nLWPOLYLINE\n 5\n%x\n100\nAcDbEntity\n 8\n%s\n 62\n%d\n100\nAcDbPolyline\n 90\n%d\n 70\n%d\n" % (self.handle, self.layer_LWPOLY, self.color_LWPOLY, len(self.poly), self.closed_LWPOLY))
+ for i in range(len(self.poly)):
+ self.dxf_add(" 10\n%f\n 20\n%f\n 30\n0.0\n" % (self.poly[i][0],self.poly[i][1]))
+ def dxf_spline(self,csp):
+@@ -169,6 +170,7 @@
+ if style['stroke'] and style['stroke'] != 'none' and style['stroke'][0:3] != 'url':
+ rgb = simplestyle.parseColor(style['stroke'])
+ hsl = coloreffect.ColorEffect.rgb_to_hsl(coloreffect.ColorEffect(),rgb[0]/255.0,rgb[1]/255.0,rgb[2]/255.0)
++ self.closed = 0 # only for LWPOLYLINE
+ self.color = 7 # default is black
+ if hsl[2]:
+ self.color = 1 + (int(6*hsl[0] + 0.5) % 6) # use 6 hues
+@@ -176,8 +178,11 @@
+ d = node.get('d')
+ if not d:
+ return
++ if (d[-1] == 'z' or d[-1] == 'Z'):
++ self.closed = 1
+ p = cubicsuperpath.parsePath(d)
+ elif node.tag == inkex.addNS('rect','svg'):
++ self.closed = 1
+ x = float(node.get('x'))
+ y = float(node.get('y'))
+ width = float(node.get('width'))
+
+=== modified file 'share/extensions/printing-marks.inx'
+--- share/extensions/printing-marks.inx 2010-03-19 16:14:05 +0000
++++ share/extensions/printing-marks.inx 2013-12-11 17:05:09 +0000
+@@ -26,12 +26,12 @@
+ <option value="cm">cm</option>
+ <option value="mm">mm</option>
+ </param>
+- <param name="crop_offset" type="float" min="0.0" max="9999.0" _gui-text="Offset:">5</param>
++ <param name="crop_offset" type="float" min="0.0" max="9999.0" precision="3" _gui-text="Offset:">5</param>
+ <_param name="bleed_settings" type="description">Bleed Margin</_param>
+- <param name="bleed_top" type="float" min="0.0" max="9999.0" _gui-text="Top:">5</param>
+- <param name="bleed_bottom" type="float" min="0.0" max="9999.0" _gui-text="Bottom:">5</param>
+- <param name="bleed_left" type="float" min="0.0" max="9999.0" _gui-text="Left:">5</param>
+- <param name="bleed_right" type="float" min="0.0" max="9999.0" _gui-text="Right:">5</param>
++ <param name="bleed_top" type="float" min="0.0" max="9999.0" precision="3" _gui-text="Top:">5</param>
++ <param name="bleed_bottom" type="float" min="0.0" max="9999.0" precision="3" _gui-text="Bottom:">5</param>
++ <param name="bleed_left" type="float" min="0.0" max="9999.0" precision="3" _gui-text="Left:">5</param>
++ <param name="bleed_right" type="float" min="0.0" max="9999.0" precision="3" _gui-text="Right:">5</param>
+ </page>
+ </param>
+
+
+=== modified file 'src/2geom/sbasis.h'
+--- src/2geom/sbasis.h 2009-04-06 22:29:34 +0000
++++ src/2geom/sbasis.h 2013-11-19 23:57:37 +0000
+@@ -75,10 +75,18 @@
+ return d[i];
+ }
+ Linear& operator[](unsigned i) { return d.at(i); }
+- Linear const* begin() const { return (Linear const*)&*d.begin();}
+- Linear const* end() const { return (Linear const*)&*d.end();}
+- Linear* begin() { return (Linear*)&*d.begin();}
+- Linear* end() { return (Linear*)&*d.end();}
++
++ //Linear const* begin() const { return (Linear const*)&*d.begin();}
++ //Linear const* end() const { return (Linear const*)&*d.end();}
++ //Linear* begin() { return (Linear*)&*d.begin();}
++ //Linear* end() { return (Linear*)&*d.end();}
++
++ std::vector<Linear>::const_iterator begin() const { return d.begin(); }
++ std::vector<Linear>::const_iterator end() const { return d.end(); }
++
++ std::vector<Linear>::iterator begin() { return d.begin(); }
++ std::vector<Linear>::iterator end() { return d.end(); }
++
+ bool empty() const {return d.empty();}
+ Linear &back() {return d.back();}
+ Linear const &back() const {return d.back();}
+@@ -87,7 +95,11 @@
+ void resize(unsigned n, Linear const& l) { d.resize(n, l);}
+ void reserve(unsigned n) { d.reserve(n);}
+ void clear() {d.clear();}
+- void insert(Linear* before, const Linear* src_begin, const Linear* src_end) { d.insert(std::vector<Linear>::iterator(before), src_begin, src_end);}
++
++ void insert(std::vector<Linear>::iterator before, std::vector<Linear>::const_iterator src_begin, std::vector<Linear>::const_iterator src_end) {
++ d.insert(before, src_begin, src_end);
++ }
++
+ //void insert(Linear* aa, Linear* bb, Linear* cc} { d.insert(aa, bb, cc);}
+ Linear& at(unsigned i) { return d.at(i);}
+ //void insert(Linear* before, int& n, Linear const &l) { d.insert(std::vector<Linear>::iterator(before), n, l);}
+@@ -283,7 +295,13 @@
+
+ inline SBasis truncate(SBasis const &a, unsigned terms) {
+ SBasis c;
+- c.insert(c.begin(), a.begin(), a.begin() + std::min(terms, (unsigned)a.size()));
++
++ std::vector<Linear>::const_iterator e = a.begin();
++ std::advance(e, std::min(terms, (unsigned)a.size()));
++
++ //c.insert(c.begin(), a.begin(), a.begin() + std::min(terms, (unsigned)a.size()));
++ c.insert(c.begin(), a.begin(), e);
++
+ return c;
+ }
+
+
+=== modified file 'src/color-profile.cpp'
+--- src/color-profile.cpp 2013-09-21 22:19:03 +0000
++++ src/color-profile.cpp 2013-12-11 17:05:09 +0000
+@@ -5,7 +5,7 @@
+ #define noDEBUG_LCMS
+
+ #include <glib/gstdio.h>
+-#include <sys/fcntl.h>
++#include <fcntl.h>
+ #include <gdkmm/color.h>
+ #include <glib/gi18n.h>
+
+@@ -639,9 +639,9 @@
+
+ cmsUInt8Number outofgamut = 0;
+ guchar check_color[4] = {
+- SP_RGBA32_R_U(val),
+- SP_RGBA32_G_U(val),
+- SP_RGBA32_B_U(val),
++ static_cast<guchar>(SP_RGBA32_R_U(val)),
++ static_cast<guchar>(SP_RGBA32_G_U(val)),
++ static_cast<guchar>(SP_RGBA32_B_U(val)),
+ 255};
+ cmsDoTransform(ColorProfile::getTransfGamutCheck(), &check_color, &outofgamut, 1);
+
+
+=== modified file 'src/dom/io/uristream.cpp'
+--- src/dom/io/uristream.cpp 2009-02-26 21:28:12 +0000
++++ src/dom/io/uristream.cpp 2013-11-19 23:57:37 +0000
+@@ -54,7 +54,7 @@
+ *
+ */
+ UriInputStream::UriInputStream(const URI &source)
+- throw (StreamException): uri((URI &)source)
++ : uri((URI &)source)
+ {
+ init();
+ }
+@@ -62,7 +62,7 @@
+ /**
+ *
+ */
+-void UriInputStream::init() throw (StreamException)
++void UriInputStream::init()
+ {
+ //get information from uri
+ scheme = uri.getScheme();
+@@ -116,7 +116,7 @@
+ /**
+ *
+ */
+-UriInputStream::~UriInputStream() throw(StreamException)
++UriInputStream::~UriInputStream()
+ {
+ close();
+ }
+@@ -126,7 +126,7 @@
+ * this input stream without blocking by the next caller of a method for
+ * this input stream.
+ */
+-int UriInputStream::available() throw(StreamException)
++int UriInputStream::available()
+ {
+ return 0;
+ }
+@@ -136,7 +136,7 @@
+ * Closes this input stream and releases any system resources
+ * associated with the stream.
+ */
+-void UriInputStream::close() throw(StreamException)
++void UriInputStream::close()
+ {
+ if (closed)
+ return;
+@@ -175,7 +175,7 @@
+ /**
+ * Reads the next byte of data from the input stream. -1 if EOF
+ */
+-int UriInputStream::get() throw(StreamException)
++int UriInputStream::get()
+ {
+ int retVal = -1;
+ if (closed)
+@@ -232,7 +232,7 @@
+ /**
+ *
+ */
+-UriReader::UriReader(const URI &uri) throw (StreamException)
++UriReader::UriReader(const URI &uri)
+ {
+ inputStream = new UriInputStream(uri);
+ }
+@@ -240,7 +240,7 @@
+ /**
+ *
+ */
+-UriReader::~UriReader() throw (StreamException)
++UriReader::~UriReader()
+ {
+ delete inputStream;
+ }
+@@ -248,7 +248,7 @@
+ /**
+ *
+ */
+-int UriReader::available() throw(StreamException)
++int UriReader::available()
+ {
+ return inputStream->available();
+ }
+@@ -256,7 +256,7 @@
+ /**
+ *
+ */
+-void UriReader::close() throw(StreamException)
++void UriReader::close()
+ {
+ inputStream->close();
+ }
+@@ -264,7 +264,7 @@
+ /**
+ *
+ */
+-int UriReader::get() throw(StreamException)
++int UriReader::get()
+ {
+ int ch = (int)inputStream->get();
+ return ch;
+@@ -279,10 +279,10 @@
+ *
+ */
+ UriOutputStream::UriOutputStream(const URI &destination)
+- throw (StreamException): closed(false),
+- ownsFile(true),
+- outf(NULL),
+- uri((URI &)destination)
++ : closed(false),
++ ownsFile(true),
++ outf(NULL),
++ uri((URI &)destination)
+ {
+ init();
+ }
+@@ -291,7 +291,7 @@
+ /**
+ *
+ */
+-void UriOutputStream::init() throw(StreamException)
++void UriOutputStream::init()
+ {
+ //get information from uri
+ scheme = uri.getScheme();
+@@ -328,7 +328,7 @@
+ /**
+ *
+ */
+-UriOutputStream::~UriOutputStream() throw(StreamException)
++UriOutputStream::~UriOutputStream()
+ {
+ close();
+ }
+@@ -337,7 +337,7 @@
+ * Closes this output stream and releases any system resources
+ * associated with this stream.
+ */
+-void UriOutputStream::close() throw(StreamException)
++void UriOutputStream::close()
+ {
+ if (closed)
+ return;
+@@ -372,7 +372,7 @@
+ * Flushes this output stream and forces any buffered output
+ * bytes to be written out.
+ */
+-void UriOutputStream::flush() throw(StreamException)
++void UriOutputStream::flush()
+ {
+ if (closed)
+ return;
+@@ -401,7 +401,7 @@
+ /**
+ * Writes the specified byte to this output stream.
+ */
+-int UriOutputStream::put(XMLCh ch) throw(StreamException)
++int UriOutputStream::put(XMLCh ch)
+ {
+ if (closed)
+ return -1;
+@@ -437,7 +437,6 @@
+ *
+ */
+ UriWriter::UriWriter(const URI &uri)
+- throw (StreamException)
+ {
+ outputStream = new UriOutputStream(uri);
+ }
+@@ -445,7 +444,7 @@
+ /**
+ *
+ */
+-UriWriter::~UriWriter() throw (StreamException)
++UriWriter::~UriWriter()
+ {
+ delete outputStream;
+ }
+@@ -453,7 +452,7 @@
+ /**
+ *
+ */
+-void UriWriter::close() throw(StreamException)
++void UriWriter::close()
+ {
+ outputStream->close();
+ }
+@@ -461,7 +460,7 @@
+ /**
+ *
+ */
+-void UriWriter::flush() throw(StreamException)
++void UriWriter::flush()
+ {
+ outputStream->flush();
+ }
+@@ -469,7 +468,7 @@
+ /**
+ *
+ */
+-int UriWriter::put(XMLCh ch) throw(StreamException)
++int UriWriter::put(XMLCh ch)
+ {
+ int ich = (int)ch;
+ if (outputStream->put(ich) < 0)
+
+=== modified file 'src/dom/io/uristream.h'
+--- src/dom/io/uristream.h 2008-04-29 02:00:54 +0000
++++ src/dom/io/uristream.h 2013-11-19 23:57:37 +0000
+@@ -65,19 +65,19 @@
+
+ public:
+
+- UriInputStream(const URI &source) throw(StreamException);
+-
+- virtual ~UriInputStream() throw(StreamException);
+-
+- virtual int available() throw(StreamException);
+-
+- virtual void close() throw(StreamException);
+-
+- virtual int get() throw(StreamException);
++ UriInputStream(const URI &source);
++
++ virtual ~UriInputStream();
++
++ virtual int available();
++
++ virtual void close();
++
++ virtual int get();
+
+ private:
+
+- void init() throw(StreamException);//common code called by constructor
++ void init() ;//common code called by constructor
+
+ bool closed;
+
+@@ -106,15 +106,15 @@
+
+ public:
+
+- UriReader(const URI &source) throw(StreamException);
+-
+- virtual ~UriReader() throw(StreamException);
+-
+- virtual int available() throw(StreamException);
+-
+- virtual void close() throw(StreamException);
+-
+- virtual int get() throw(StreamException);
++ UriReader(const URI &source);
++
++ virtual ~UriReader();
++
++ virtual int available();
++
++ virtual void close();
++
++ virtual int get();
+
+ private:
+
+@@ -138,19 +138,19 @@
+
+ public:
+
+- UriOutputStream(const URI &destination) throw(StreamException);
+-
+- virtual ~UriOutputStream() throw(StreamException);
+-
+- virtual void close() throw(StreamException);
+-
+- virtual void flush() throw(StreamException);
+-
+- virtual int put(XMLCh ch) throw(StreamException);
++ UriOutputStream(const URI &destination);
++
++ virtual ~UriOutputStream();
++
++ virtual void close();
++
++ virtual void flush();
++
++ virtual int put(XMLCh ch);
+
+ private:
+
+- void init() throw(StreamException); //common code called by constructor
++ void init() ; //common code called by constructor
+
+ bool closed;
+ bool ownsFile;
+@@ -179,15 +179,15 @@
+
+ public:
+
+- UriWriter(const URI &source) throw(StreamException);
+-
+- virtual ~UriWriter() throw(StreamException);
+-
+- virtual void close() throw(StreamException);
+-
+- virtual void flush() throw(StreamException);
+-
+- virtual int put(XMLCh ch) throw(StreamException);
++ UriWriter(const URI &source) ;
++
++ virtual ~UriWriter() ;
++
++ virtual void close() ;
++
++ virtual void flush() ;
++
++ virtual int put(XMLCh ch) ;
+
+ private:
+
+
+=== modified file 'src/dom/svgimpl.cpp'
+--- src/dom/svgimpl.cpp 2008-06-11 21:23:49 +0000
++++ src/dom/svgimpl.cpp 2013-11-19 23:57:37 +0000
+@@ -81,7 +81,7 @@
+ typedef struct
+ {
+ const char *name;
+- int type;
++ unsigned int type;
+ } SVGTableEntry;
+
+
+@@ -266,9 +266,9 @@
+ * Return the string corresponding to a given SVG element type enum
+ * Return "unknown" if not found
+ */
+-const char *svgInterfaceEnumToStr(int type)
++const char *svgInterfaceEnumToStr(unsigned int type)
+ {
+- if (type < 1 || type > (int)SVG_ZOOM_AND_PAN)
++ if (type < 1 || type > SVG_ZOOM_AND_PAN)
+ return "unknown";
+ SVGTableEntry *entry = interfaceTable;
+ for (int i = 0 ; i < SVG_NR_INTERFACES ; i++)
+
+=== modified file 'src/extension/effect.cpp'
+--- src/extension/effect.cpp 2010-09-28 21:11:41 +0000
++++ src/extension/effect.cpp 2013-11-19 23:57:37 +0000
+@@ -36,7 +36,7 @@
+ Effect::Effect (Inkscape::XML::Node * in_repr, Implementation::Implementation * in_imp)
+ : Extension(in_repr, in_imp),
+ _id_noprefs(Glib::ustring(get_id()) + ".noprefs"),
+- _name_noprefs(Glib::ustring(get_name()) + _(" (No preferences)")),
++ _name_noprefs(Glib::ustring(_(get_name())) + _(" (No preferences)")),
+ _verb(get_id(), get_name(), NULL, NULL, this, true),
+ _verb_nopref(_id_noprefs.c_str(), _name_noprefs.c_str(), NULL, NULL, this, false),
+ _menu_node(NULL), _workingDialog(true),
+
+=== modified file 'src/extension/internal/filter/filter.cpp'
+--- src/extension/internal/filter/filter.cpp 2010-04-01 08:14:55 +0000
++++ src/extension/internal/filter/filter.cpp 2013-12-11 17:05:09 +0000
+@@ -146,11 +146,11 @@
+ if (filter == NULL) {
+
+ Inkscape::XML::Node * newfilterroot = xmldoc->createElement("svg:filter");
++ merge_filters(newfilterroot, filterdoc->root(), xmldoc);
+ defsrepr->appendChild(newfilterroot);
+
+ Glib::ustring url = "url(#"; url += newfilterroot->attribute("id"); url += ")";
+
+- merge_filters(newfilterroot, filterdoc->root(), xmldoc);
+
+ Inkscape::GC::release(newfilterroot);
+
+
+=== modified file 'src/extension/system.cpp'
+--- src/extension/system.cpp 2013-09-21 22:20:09 +0000
++++ src/extension/system.cpp 2013-11-19 23:57:37 +0000
+@@ -20,6 +20,7 @@
+
+ #include <interface.h>
+
++#include <unistd.h>
+ #include "system.h"
+ #include "preferences.h"
+ #include "extension.h"
+
+=== modified file 'src/interface.cpp'
+--- src/interface.cpp 2012-02-08 01:17:54 +0000
++++ src/interface.cpp 2013-12-11 17:05:09 +0000
+@@ -1577,14 +1577,16 @@
+ //- a GtkHBox, whose first child is a label displaying name if the menu
+ //item has an accel key
+ //- a GtkLabel if the menu has no accel key
+- if (GTK_IS_LABEL(child)) {
+- gtk_label_set_markup_with_mnemonic(GTK_LABEL (child), name.c_str());
+- } else if (GTK_IS_HBOX(child)) {
+- gtk_label_set_markup_with_mnemonic(
+- GTK_LABEL (gtk_container_get_children(GTK_CONTAINER (child))->data),
+- name.c_str());
+- }//else sp_ui_menu_append_item_from_verb has been modified and can set
+- //a menu item in yet another way...
++ if (child != NULL){
++ if (GTK_IS_LABEL(child)) {
++ gtk_label_set_markup_with_mnemonic(GTK_LABEL (child), name.c_str());
++ } else if (GTK_IS_HBOX(child)) {
++ gtk_label_set_markup_with_mnemonic(
++ GTK_LABEL (gtk_container_get_children(GTK_CONTAINER (child))->data),
++ name.c_str());
++ }//else sp_ui_menu_append_item_from_verb has been modified and can set
++ //a menu item in yet another way...
++ }
+ }
+
+ void injectRenamedIcons()
+
+=== modified file 'src/io/inkjar.cpp'
+--- src/io/inkjar.cpp 2011-07-20 20:17:25 +0000
++++ src/io/inkjar.cpp 2013-11-19 23:57:37 +0000
+@@ -68,7 +68,8 @@
+ {
+ _filename = g_strdup(new_filename);
+ _last_filename = NULL;
+- fd = -1;
++ //fd = -1;
++fd=NULL;
+ }
+
+ //fixme: the following should probably just return a const gchar* and not
+@@ -102,9 +103,11 @@
+ return true;
+ }
+
++#include <cstdio>
++
+ bool JarFile::open()
+ {
+- if ((fd = ::open(_filename, O_RDONLY)) < 0) {
++ if ((fd = fopen(_filename, O_RDONLY)) < 0) {
+ fprintf(stderr, "open failed.\n");
+ return false;
+ }
+@@ -116,7 +119,7 @@
+
+ bool JarFile::close()
+ {
+- if (fd >= 0 && !::close(fd)) {
++ if (fd >= 0 && !fclose(fd)) {
+ inflateEnd(&_zs);
+ return true;
+ }
+@@ -256,7 +259,7 @@
+
+ if (method == 8 || flags & 0x0008) {
+ unsigned int file_length = 0;//uncompressed file length
+- lseek(fd, eflen, SEEK_CUR);
++ fseek(fd, eflen, SEEK_CUR);
+ guint8 *file_data = get_compressed_file(compressed_size, file_length,
+ crc, flags);
+ if (file_data == NULL) {
+@@ -274,7 +277,7 @@
+ }
+ g_byte_array_append(gba, file_data, compressed_size);
+ } else {
+- lseek(fd, compressed_size+eflen, SEEK_CUR);
++ fseek(fd, compressed_size+eflen, SEEK_CUR);
+ g_byte_array_free(gba, FALSE);
+ return NULL;
+ }
+@@ -313,8 +316,8 @@
+ std::printf("%d bytes written\n", out_a);
+ #endif
+ }
+- lseek(fd, eflen, SEEK_CUR);
+ g_free(bytes);
++ fseek(fd, eflen, SEEK_CUR);
+
+ if (!check_crc(crc, crc2, flags)) {
+ bytes = gba->data;
+@@ -328,7 +331,8 @@
+ int JarFile::read(guint8 *buf, int count)
+ {
+ int nbytes;
+- if ((nbytes = ::read(fd, buf, count)) != count) {
++ //if ((nbytes = ::read(fd, buf, count)) != count) {
++if ((nbytes = fread(buf, 1, count, fd)) != count) {
+ fprintf(stderr, "read error\n");
+ exit(1);
+ return 0;
+@@ -357,9 +361,12 @@
+
+ if (!_zs.avail_in) {
+
+- if ((nbytes = ::read(fd, in_buffer,
++ /*if ((nbytes = ::read(fd, in_buffer,
+ (leftover_in < RDSZ ? leftover_in : RDSZ)))
+ < 0) {
++*/
++if ((nbytes = fread(in_buffer, 1, (leftover_in < RDSZ ? leftover_in : RDSZ), fd))
++< 0) {
+ fprintf(stderr, "jarfile read error");
+ }
+ _zs.avail_in = nbytes;
+@@ -537,7 +544,8 @@
+ }
+ }
+ } else if (gba->len > 0)
+- ::write(1, gba->data, gba->len);
++ //::write(1, gba->data, gba->len);
++fwrite(gba->data, 1, gba-len, stdout);
+ else
+ break;
+ }
+
+=== modified file 'src/io/inkjar.h'
+--- src/io/inkjar.h 2011-12-08 22:05:10 +0000
++++ src/io/inkjar.h 2013-11-19 23:57:37 +0000
+@@ -27,6 +27,7 @@
+ #endif
+
+ #include <glib.h>
++#include <stdio.h>
+
+ namespace Inkjar {
+
+@@ -91,7 +92,7 @@
+ class JarFile {
+ public:
+
+- JarFile() : fd(-1), _filename(NULL), _last_filename(NULL) {}
++ JarFile() : fd(NULL), _filename(NULL), _last_filename(NULL) {}
+ virtual ~JarFile();
+ JarFile(gchar const *new_filename);
+
+@@ -106,7 +107,8 @@
+
+ private:
+
+- int fd;
++// int fd;
++FILE* fd;
+ gchar *_filename;
+ z_stream _zs;
+ gchar *_last_filename;
+
+=== modified file 'src/io/uristream.cpp'
+--- src/io/uristream.cpp 2009-08-02 15:04:57 +0000
++++ src/io/uristream.cpp 2013-11-19 23:57:37 +0000
+@@ -104,7 +104,7 @@
+ *
+ */
+ UriInputStream::UriInputStream(Inkscape::URI &source)
+- throw (StreamException): uri(source)
++ : uri(source)
+ {
+ //get information from uri
+ char const *schemestr = uri.getScheme();
+@@ -146,8 +146,8 @@
+ *
+ */
+ UriInputStream::UriInputStream(FILE *source, Inkscape::URI &uri)
+- throw (StreamException): inf(source),
+- uri(uri)
++ : inf(source),
++ uri(uri)
+ {
+ scheme = SCHEME_FILE;
+ if (!inf) {
+@@ -160,7 +160,7 @@
+ /**
+ *
+ */
+-UriInputStream::~UriInputStream() throw(StreamException)
++UriInputStream::~UriInputStream()
+ {
+ close();
+ }
+@@ -170,7 +170,7 @@
+ * this input stream without blocking by the next caller of a method for
+ * this input stream.
+ */
+-int UriInputStream::available() throw(StreamException)
++int UriInputStream::available()
+ {
+ return 0;
+ }
+@@ -180,7 +180,7 @@
+ * Closes this input stream and releases any system resources
+ * associated with the stream.
+ */
+-void UriInputStream::close() throw(StreamException)
++void UriInputStream::close()
+ {
+ if (closed)
+ return;
+@@ -207,7 +207,7 @@
+ /**
+ * Reads the next byte of data from the input stream. -1 if EOF
+ */
+-int UriInputStream::get() throw(StreamException)
++int UriInputStream::get()
+ {
+ int retVal = -1;
+ if (!closed)
+@@ -249,7 +249,6 @@
+ *
+ */
+ UriReader::UriReader(Inkscape::URI &uri)
+- throw (StreamException)
+ {
+ inputStream = new UriInputStream(uri);
+ }
+@@ -257,7 +256,7 @@
+ /**
+ *
+ */
+-UriReader::~UriReader() throw (StreamException)
++UriReader::~UriReader()
+ {
+ delete inputStream;
+ }
+@@ -265,7 +264,7 @@
+ /**
+ *
+ */
+-int UriReader::available() throw(StreamException)
++int UriReader::available()
+ {
+ return inputStream->available();
+ }
+@@ -273,7 +272,7 @@
+ /**
+ *
+ */
+-void UriReader::close() throw(StreamException)
++void UriReader::close()
+ {
+ inputStream->close();
+ }
+@@ -281,7 +280,7 @@
+ /**
+ *
+ */
+-gunichar UriReader::get() throw(StreamException)
++gunichar UriReader::get()
+ {
+ gunichar ch = (gunichar)inputStream->get();
+ return ch;
+@@ -296,11 +295,11 @@
+ * Temporary kludge
+ */
+ UriOutputStream::UriOutputStream(FILE* fp, Inkscape::URI &destination)
+- throw (StreamException): closed(false),
+- ownsFile(false),
+- outf(fp),
+- uri(destination),
+- scheme(SCHEME_FILE)
++ : closed(false),
++ ownsFile(false),
++ outf(fp),
++ uri(destination),
++ scheme(SCHEME_FILE)
+ {
+ if (!outf) {
+ Glib::ustring err = "UriOutputStream given null file ";
+@@ -312,11 +311,11 @@
+ *
+ */
+ UriOutputStream::UriOutputStream(Inkscape::URI &destination)
+- throw (StreamException): closed(false),
+- ownsFile(true),
+- outf(NULL),
+- uri(destination),
+- scheme(SCHEME_FILE)
++ : closed(false),
++ ownsFile(true),
++ outf(NULL),
++ uri(destination),
++ scheme(SCHEME_FILE)
+ {
+ //get information from uri
+ char const *schemestr = uri.getScheme();
+@@ -353,7 +352,7 @@
+ /**
+ *
+ */
+-UriOutputStream::~UriOutputStream() throw(StreamException)
++UriOutputStream::~UriOutputStream()
+ {
+ close();
+ }
+@@ -362,7 +361,7 @@
+ * Closes this output stream and releases any system resources
+ * associated with this stream.
+ */
+-void UriOutputStream::close() throw(StreamException)
++void UriOutputStream::close()
+ {
+ if (closed)
+ return;
+@@ -391,7 +390,7 @@
+ * Flushes this output stream and forces any buffered output
+ * bytes to be written out.
+ */
+-void UriOutputStream::flush() throw(StreamException)
++void UriOutputStream::flush()
+ {
+ if (closed)
+ return;
+@@ -415,7 +414,7 @@
+ /**
+ * Writes the specified byte to this output stream.
+ */
+-void UriOutputStream::put(int ch) throw(StreamException)
++void UriOutputStream::put(int ch)
+ {
+ if (closed)
+ return;
+@@ -453,7 +452,6 @@
+ *
+ */
+ UriWriter::UriWriter(Inkscape::URI &uri)
+- throw (StreamException)
+ {
+ outputStream = new UriOutputStream(uri);
+ }
+@@ -461,7 +459,7 @@
+ /**
+ *
+ */
+-UriWriter::~UriWriter() throw (StreamException)
++UriWriter::~UriWriter()
+ {
+ delete outputStream;
+ }
+@@ -469,7 +467,7 @@
+ /**
+ *
+ */
+-void UriWriter::close() throw(StreamException)
++void UriWriter::close()
+ {
+ outputStream->close();
+ }
+@@ -477,7 +475,7 @@
+ /**
+ *
+ */
+-void UriWriter::flush() throw(StreamException)
++void UriWriter::flush()
+ {
+ outputStream->flush();
+ }
+@@ -485,7 +483,7 @@
+ /**
+ *
+ */
+-void UriWriter::put(gunichar ch) throw(StreamException)
++void UriWriter::put(gunichar ch)
+ {
+ int ich = (int)ch;
+ outputStream->put(ich);
+
+=== modified file 'src/io/uristream.h'
+--- src/io/uristream.h 2006-01-16 02:36:01 +0000
++++ src/io/uristream.h 2013-11-19 23:57:37 +0000
+@@ -35,17 +35,17 @@
+ {
+
+ public:
+- UriInputStream(FILE *source, Inkscape::URI &uri) throw(StreamException);
+-
+- UriInputStream(Inkscape::URI &source) throw(StreamException);
+-
+- virtual ~UriInputStream() throw(StreamException);
+-
+- virtual int available() throw(StreamException);
+-
+- virtual void close() throw(StreamException);
+-
+- virtual int get() throw(StreamException);
++ UriInputStream(FILE *source, Inkscape::URI &uri);
++
++ UriInputStream(Inkscape::URI &source);
++
++ virtual ~UriInputStream();
++
++ virtual int available();
++
++ virtual void close();
++
++ virtual int get();
+
+ private:
+
+@@ -74,15 +74,15 @@
+
+ public:
+
+- UriReader(Inkscape::URI &source) throw(StreamException);
+-
+- virtual ~UriReader() throw(StreamException);
+-
+- virtual int available() throw(StreamException);
+-
+- virtual void close() throw(StreamException);
+-
+- virtual gunichar get() throw(StreamException);
++ UriReader(Inkscape::URI &source);
++
++ virtual ~UriReader();
++
++ virtual int available();
++
++ virtual void close();
++
++ virtual gunichar get();
+
+ private:
+
+@@ -106,17 +106,17 @@
+
+ public:
+
+- UriOutputStream(FILE *fp, Inkscape::URI &destination) throw(StreamException);
+-
+- UriOutputStream(Inkscape::URI &destination) throw(StreamException);
+-
+- virtual ~UriOutputStream() throw(StreamException);
+-
+- virtual void close() throw(StreamException);
+-
+- virtual void flush() throw(StreamException);
+-
+- virtual void put(int ch) throw(StreamException);
++ UriOutputStream(FILE *fp, Inkscape::URI &destination);
++
++ UriOutputStream(Inkscape::URI &destination);
++
++ virtual ~UriOutputStream();
++
++ virtual void close();
++
++ virtual void flush();
++
++ virtual void put(int ch);
+
+ private:
+
+@@ -145,15 +145,15 @@
+
+ public:
+
+- UriWriter(Inkscape::URI &source) throw(StreamException);
+-
+- virtual ~UriWriter() throw(StreamException);
+-
+- virtual void close() throw(StreamException);
+-
+- virtual void flush() throw(StreamException);
+-
+- virtual void put(gunichar ch) throw(StreamException);
++ UriWriter(Inkscape::URI &source);
++
++ virtual ~UriWriter();
++
++ virtual void close();
++
++ virtual void flush();
++
++ virtual void put(gunichar ch);
+
+ private:
+
+
+=== modified file 'src/io/xsltstream.cpp'
+--- src/io/xsltstream.cpp 2008-05-04 16:09:41 +0000
++++ src/io/xsltstream.cpp 2013-11-19 23:57:37 +0000
+@@ -30,7 +30,6 @@
+ *
+ */
+ XsltStyleSheet::XsltStyleSheet(InputStream &xsltSource)
+- throw (StreamException)
+ : stylesheet(NULL)
+ {
+ if (!read(xsltSource)) {
+@@ -86,7 +85,6 @@
+ *
+ */
+ XsltInputStream::XsltInputStream(InputStream &xmlSource, XsltStyleSheet &sheet)
+- throw (StreamException)
+ : BasicInputStream(xmlSource), stylesheet(sheet)
+ {
+ //Load the data
+@@ -110,7 +108,7 @@
+ /**
+ *
+ */
+-XsltInputStream::~XsltInputStream() throw (StreamException)
++XsltInputStream::~XsltInputStream()
+ {
+ xmlFree(outbuf);
+ }
+@@ -120,7 +118,7 @@
+ * this input stream without blocking by the next caller of a method for
+ * this input stream.
+ */
+-int XsltInputStream::available() throw (StreamException)
++int XsltInputStream::available()
+ {
+ return outsize - outpos;
+ }
+@@ -130,7 +128,7 @@
+ * Closes this input stream and releases any system resources
+ * associated with the stream.
+ */
+-void XsltInputStream::close() throw (StreamException)
++void XsltInputStream::close()
+ {
+ closed = true;
+ }
+@@ -138,7 +136,7 @@
+ /**
+ * Reads the next byte of data from the input stream. -1 if EOF
+ */
+-int XsltInputStream::get() throw (StreamException)
++int XsltInputStream::get()
+ {
+ if (closed)
+ return -1;
+@@ -161,7 +159,6 @@
+ *
+ */
+ XsltOutputStream::XsltOutputStream(OutputStream &dest, XsltStyleSheet &sheet)
+- throw (StreamException)
+ : BasicOutputStream(dest), stylesheet(sheet)
+ {
+ flushed = false;
+@@ -170,7 +167,7 @@
+ /**
+ *
+ */
+-XsltOutputStream::~XsltOutputStream() throw (StreamException)
++XsltOutputStream::~XsltOutputStream()
+ {
+ //do not automatically close
+ }
+@@ -179,7 +176,7 @@
+ * Closes this output stream and releases any system resources
+ * associated with this stream.
+ */
+-void XsltOutputStream::close() throw (StreamException)
++void XsltOutputStream::close()
+ {
+ flush();
+ destination.close();
+@@ -189,7 +186,7 @@
+ * Flushes this output stream and forces any buffered output
+ * bytes to be written out.
+ */
+-void XsltOutputStream::flush() throw (StreamException)
++void XsltOutputStream::flush()
+ {
+ if (flushed)
+ {
+@@ -230,7 +227,7 @@
+ /**
+ * Writes the specified byte to this output stream.
+ */
+-void XsltOutputStream::put(int ch) throw (StreamException)
++void XsltOutputStream::put(int ch)
+ {
+ gunichar uch = (gunichar) ch;
+ outbuf.push_back(uch);
+
+=== modified file 'src/io/xsltstream.h'
+--- src/io/xsltstream.h 2008-05-04 16:09:41 +0000
++++ src/io/xsltstream.h 2013-11-19 23:57:37 +0000
+@@ -38,7 +38,7 @@
+ /**
+ * Constructor with loading
+ */
+- XsltStyleSheet(InputStream &source) throw (StreamException);
++ XsltStyleSheet(InputStream &source) ;
+
+ /**
+ * Simple constructor, no loading
+@@ -73,16 +73,15 @@
+
+ public:
+
+- XsltInputStream(InputStream &xmlSource, XsltStyleSheet &stylesheet)
+- throw (StreamException);
+-
+- virtual ~XsltInputStream() throw (StreamException);
+-
+- virtual int available() throw (StreamException);
+-
+- virtual void close() throw (StreamException);
+-
+- virtual int get() throw (StreamException);
++ XsltInputStream(InputStream &xmlSource, XsltStyleSheet &stylesheet);
++
++ virtual ~XsltInputStream();
++
++ virtual int available();
++
++ virtual void close();
++
++ virtual int get();
+
+
+ private:
+@@ -110,16 +109,15 @@
+
+ public:
+
+- XsltOutputStream(OutputStream &destination, XsltStyleSheet &stylesheet)
+- throw (StreamException);
+-
+- virtual ~XsltOutputStream() throw (StreamException);
+-
+- virtual void close() throw (StreamException);
+-
+- virtual void flush() throw (StreamException);
+-
+- virtual void put(int ch) throw (StreamException);
++ XsltOutputStream(OutputStream &destination, XsltStyleSheet &stylesheet);
++
++ virtual ~XsltOutputStream();
++
++ virtual void close();
++
++ virtual void flush();
++
++ virtual void put(int ch);
+
+ private:
+
+
+=== modified file 'src/libcroco/cr-rgb.c'
+--- src/libcroco/cr-rgb.c 2006-11-15 09:36:19 +0000
++++ src/libcroco/cr-rgb.c 2013-12-11 17:05:09 +0000
+@@ -418,14 +418,14 @@
+
+ g_return_val_if_fail (a_this && a_color_name, CR_BAD_PARAM_ERROR);
+
+- for (i = 0; i < sizeof (gv_standard_colors); i++) {
++ for (i = 0; i < G_N_ELEMENTS (gv_standard_colors); i++) {
+ if (!strcmp ((char *)a_color_name, gv_standard_colors[i].name)) {
+ cr_rgb_set_from_rgb (a_this, &gv_standard_colors[i]);
+ break;
+ }
+ }
+
+- if (i < sizeof (gv_standard_colors))
++ if (i < G_N_ELEMENTS (gv_standard_colors))
+ status = CR_OK;
+ else
+ status = CR_UNKNOWN_TYPE_ERROR;
+
+=== modified file 'src/libgdl/gdl-dock-object.h'
+--- src/libgdl/gdl-dock-object.h 2011-06-04 06:04:06 +0000
++++ src/libgdl/gdl-dock-object.h 2013-11-19 23:57:37 +0000
+@@ -215,7 +215,7 @@
+ G_STMT_START { \
+ g_log (G_LOG_DOMAIN, \
+ G_LOG_LEVEL_DEBUG, \
+- "%s:%d (%s) %s [%p %d%s:%d]: "format, \
++ "%s:%d (%s) %s [%p %d%s:%d]: " format, \
+ __FILE__, \
+ __LINE__, \
+ __PRETTY_FUNCTION__, \
+
+=== modified file 'src/libgdl/gdl-tools.h'
+--- src/libgdl/gdl-tools.h 2011-06-04 06:04:06 +0000
++++ src/libgdl/gdl-tools.h 2013-11-19 23:57:37 +0000
+@@ -48,7 +48,7 @@
+ #define GDL_TRACE_EXTRA(format, args...) G_STMT_START { \
+ g_log (G_LOG_DOMAIN, \
+ G_LOG_LEVEL_DEBUG, \
+- "file %s: line %d (%s): "format, \
++ "file %s: line %d (%s): " format, \
+ __FILE__, \
+ __LINE__, \
+ __PRETTY_FUNCTION__, \
+
+=== modified file 'src/libnrtype/FontFactory.h'
+--- src/libnrtype/FontFactory.h 2010-04-15 19:00:11 +0000
++++ src/libnrtype/FontFactory.h 2013-12-02 00:55:44 +0000
+@@ -31,7 +31,8 @@
+ #include <pango/pangowin32.h>
+ #else
+ #include <pango/pangoft2.h>
+-#include <freetype/freetype.h>
++#include <ft2build.h>
++#include FT_FREETYPE_H
+ #endif
+
+ namespace Glib
+
+=== modified file 'src/libnrtype/Layout-TNG-OutIter.cpp'
+--- src/libnrtype/Layout-TNG-OutIter.cpp 2009-12-29 19:46:02 +0000
++++ src/libnrtype/Layout-TNG-OutIter.cpp 2013-11-19 23:57:37 +0000
+@@ -197,7 +197,23 @@
+
+ Layout::iterator Layout::sourceToIterator(void *source_cookie) const
+ {
+- return sourceToIterator(source_cookie, Glib::ustring::const_iterator(std::string::const_iterator(NULL)));
++ //return sourceToIterator(source_cookie, Glib::ustring::const_iterator(std::string::const_iterator(NULL)));
++
++ // simply copied from above... what is an iterator to NULL?
++ unsigned source_index;
++ if (_characters.empty()) return end();
++ for (source_index = 0 ; source_index < _input_stream.size() ; source_index++)
++ if (_input_stream[source_index]->source_cookie == source_cookie) break;
++ if (source_index == _input_stream.size()) return end();
++
++ unsigned char_index = _sourceToCharacter(source_index);
++
++ if (_input_stream[source_index]->Type() != TEXT_SOURCE)
++ return iterator(this, char_index);
++
++ InputStreamTextSource const *text_source = static_cast<InputStreamTextSource const *>(_input_stream[source_index]);
++ //if (text_iterator <= text_source->text_begin) return iterator(this, char_index);
++ return iterator(this, char_index);
+ }
+
+ Geom::OptRect Layout::glyphBoundingBox(iterator const &it, double *rotation) const
+@@ -506,18 +522,23 @@
+ *source_cookie = stream_item->source_cookie;
+ if (text_iterator && stream_item->Type() == TEXT_SOURCE) {
+ InputStreamTextSource const *text_source = static_cast<InputStreamTextSource const *>(stream_item);
+- Glib::ustring::const_iterator text_iter_const = text_source->text_begin;
++ //Glib::ustring::const_iterator text_iter_const = text_source->text_begin;
++ Glib::ustring::iterator text_iter = const_cast<Glib::ustring*>(text_source->text)->begin();
+ unsigned char_index = it._char_index;
+ unsigned original_input_source_index = _spans[_characters[char_index].in_span].in_input_stream_item;
+ // confusing algorithm because the iterator goes forwards while the index goes backwards.
+ // It's just that it's faster doing it that way
+ while (char_index && _spans[_characters[char_index - 1].in_span].in_input_stream_item == original_input_source_index) {
+- ++text_iter_const;
++ //++text_iter_const;
++ ++text_iter;
+ char_index--;
+ }
+- text_source->text->begin().base() + (text_iter_const.base() - text_source->text->begin().base());
+- *text_iterator = Glib::ustring::iterator(std::string::iterator(const_cast<char*>(&*text_source->text->begin().base() + (text_iter_const.base() - text_source->text->begin().base()))));
++ //text_source->text->begin().base() + (text_iter_const.base() - text_source->text->begin().base());
++
++ // FIXME C++11
++ //*text_iterator = Glib::ustring::iterator(std::string::iterator(const_cast<char*>(&*text_source->text->begin().base() + (text_iter_const.base() - text_source->text->begin().base()))));
+ // the caller owns the string, so they're going to want a non-const iterator
++ *text_iterator = text_iter;
+ }
+ }
+
+
+=== modified file 'src/libvpsc/Makefile_insert'
+--- src/libvpsc/Makefile_insert 2007-03-22 00:37:48 +0000
++++ src/libvpsc/Makefile_insert 2013-11-19 23:57:37 +0000
+@@ -11,7 +11,6 @@
+ libvpsc/pairingheap/PairingHeap.cpp\
+ libvpsc/remove_rectangle_overlap.cpp\
+ libvpsc/solve_VPSC.cpp\
+- libvpsc/csolve_VPSC.cpp\
+ libvpsc/variable.cpp\
+ libvpsc/block.h\
+ libvpsc/blocks.h\
+@@ -21,5 +20,4 @@
+ libvpsc/pairingheap/dsexceptions.h\
+ libvpsc/remove_rectangle_overlap.h\
+ libvpsc/solve_VPSC.h\
+- libvpsc/csolve_VPSC.h\
+ libvpsc/variable.h
+
+=== removed file 'src/libvpsc/csolve_VPSC.cpp'
+--- src/libvpsc/csolve_VPSC.cpp 2008-01-31 19:06:59 +0000
++++ src/libvpsc/csolve_VPSC.cpp 1970-01-01 00:00:00 +0000
+@@ -1,126 +0,0 @@
+-/**
+- * \brief Bridge for C programs to access solve_VPSC (which is in C++)
+- *
+- * Authors:
+- * Tim Dwyer <tgdwyer at gmail.com>
+- *
+- * Copyright (C) 2005 Authors
+- *
+- * Released under GNU LGPL. Read the file 'COPYING' for more information.
+- */
+-#include <iostream>
+-#include <cassert>
+-#include <cstdlib>
+-#include "variable.h"
+-#include "constraint.h"
+-#include "generate-constraints.h"
+-#include "solve_VPSC.h"
+-#include "csolve_VPSC.h"
+-using namespace vpsc;
+-extern "C" {
+-Variable* newVariable(int id, double desiredPos, double weight) {
+- return new Variable(id,desiredPos,weight);
+-}
+-Constraint* newConstraint(Variable* left, Variable* right, double gap) {
+- return new Constraint(left,right,gap);
+-}
+-Solver* newSolver(int n, Variable* vs[], int m, Constraint* cs[]) {
+- return new Solver(n,vs,m,cs);
+-}
+-Solver* newIncSolver(int n, Variable* vs[], int m, Constraint* cs[]) {
+- return (Solver*)new vpsc::IncSolver(n,vs,m,cs);
+-}
+-
+-int genXConstraints(int n, boxf* bb, Variable** vs, Constraint*** cs,int transitiveClosure) {
+- Rectangle* rs[n];
+- for(int i=0;i<n;i++) {
+- rs[i]=new Rectangle(bb[i].LL.x,bb[i].UR.x,bb[i].LL.y,bb[i].UR.y);
+- }
+- int m = generateXConstraints(n,rs,vs,*cs,transitiveClosure);
+- for(int i=0;i<n;i++) {
+- delete rs[i];
+- }
+- return m;
+-}
+-int genYConstraints(int n, boxf* bb, Variable** vs, Constraint*** cs) {
+- Rectangle* rs[n];
+- for(int i=0;i<n;i++) {
+- rs[i]=new Rectangle(bb[i].LL.x,bb[i].UR.x,bb[i].LL.y,bb[i].UR.y);
+- }
+- int m = generateYConstraints(n,rs,vs,*cs);
+- for(int i=0;i<n;i++) {
+- delete rs[i];
+- }
+- return m;
+-}
+-
+-Constraint** newConstraints(int m) {
+- return new Constraint*[m];
+-}
+-void deleteConstraints(int m, Constraint **cs) {
+- for(int i=0;i<m;i++) {
+- delete cs[i];
+- }
+- delete [] cs;
+-}
+-void deleteConstraint(Constraint* c) {
+- delete c;
+-}
+-void deleteVariable(Variable* v) {
+- delete v;
+-}
+-void satisfyVPSC(Solver* vpsc) {
+- try {
+- vpsc->satisfy();
+- } catch(const char *e) {
+- std::cerr << e << std::endl;
+- exit(1);
+- }
+-}
+-int getSplitCnt(IncSolver *vpsc) {
+- return vpsc->splitCnt;
+-}
+-void deleteVPSC(Solver *vpsc) {
+- assert(vpsc!=NULL);
+- delete vpsc;
+-}
+-void solveVPSC(Solver* vpsc) {
+- vpsc->solve();
+-}
+-void splitIncVPSC(IncSolver* vpsc) {
+- vpsc->splitBlocks();
+-}
+-void setVariableDesiredPos(Variable *v, double desiredPos) {
+- v->desiredPosition = desiredPos;
+-}
+-double getVariablePos(Variable *v) {
+- return v->position();
+-}
+-void remapInConstraints(Variable *u, Variable *v, double dgap) {
+- for(Constraints::iterator i=u->in.begin();i!=u->in.end();i++) {
+- Constraint* c=*i;
+- c->right=v;
+- c->gap+=dgap;
+- v->in.push_back(c);
+- }
+- u->in.clear();
+-}
+-void remapOutConstraints(Variable *u, Variable *v, double dgap) {
+- for(Constraints::iterator i=u->out.begin();i!=u->out.end();i++) {
+- Constraint* c=*i;
+- c->left=v;
+- c->gap+=dgap;
+- v->out.push_back(c);
+- }
+- u->out.clear();
+-}
+-int getLeftVarID(Constraint *c) {
+- return c->left->id;
+-}
+-int getRightVarID(Constraint *c){
+- return c->right->id;
+-}
+-double getSeparation(Constraint *c){
+- return c->gap;
+-}
+-}
+
+=== removed file 'src/libvpsc/csolve_VPSC.h'
+--- src/libvpsc/csolve_VPSC.h 2006-07-14 04:09:40 +0000
++++ src/libvpsc/csolve_VPSC.h 1970-01-01 00:00:00 +0000
+@@ -1,60 +0,0 @@
+-/**
+- * \brief Bridge for C programs to access solve_VPSC (which is in C++)
+- *
+- * Authors:
+- * Tim Dwyer <tgdwyer at gmail.com>
+- *
+- * Copyright (C) 2005 Authors
+- *
+- * Released under GNU LGPL. Read the file 'COPYING' for more information.
+- */
+-#ifndef _CSOLVE_VPSC_H_
+-#define _CSOLVE_VPSC_H_
+-#ifdef __cplusplus
+-class vpsc::Variable;
+-class vpsc::Constraint;
+-class vpsc::Solver;
+-class vpsc::IncSolver;
+-using namespace vpsc;
+-extern "C" {
+-#else
+-typedef struct Variable Variable;
+-typedef struct Constraint Constraint;
+-typedef struct Solver Solver;
+-typedef struct IncSolver IncSolver;
+-#endif
+-Variable* newVariable(int id, double desiredPos, double weight);
+-void setVariableDesiredPos(Variable *, double desiredPos);
+-double getVariablePos(Variable*);
+-
+-Constraint* newConstraint(Variable* left, Variable* right, double gap);
+-
+-Solver* newSolver(int n, Variable* vs[], int m, Constraint* cs[]);
+-void deleteSolver(Solver*);
+-void deleteConstraint(Constraint*);
+-void deleteVariable(Variable*);
+-Constraint** newConstraints(int m);
+-void deleteConstraints(int m,Constraint**);
+-void remapInConstraints(Variable *u, Variable *v, double dgap);
+-void remapOutConstraints(Variable *u, Variable *v, double dgap);
+-int getLeftVarID(Constraint *c);
+-int getRightVarID(Constraint *c);
+-double getSeparation(Constraint *c);
+-
+-#ifndef HAVE_POINTF_S
+-typedef struct pointf_s { double x, y; } pointf;
+-typedef struct { pointf LL, UR; } boxf;
+-#endif
+-int genXConstraints(int n, boxf[], Variable** vs, Constraint*** cs,
+- int transitiveClosure);
+-int genYConstraints(int n, boxf[], Variable** vs, Constraint*** cs);
+-
+-void satisfyVPSC(Solver*);
+-void solveVPSC(Solver*);
+-Solver* newIncSolver(int n, Variable* vs[], int m, Constraint* cs[]);
+-void splitIncSolver(IncSolver*);
+-int getSplitCnt(IncSolver *vpsc);
+-#ifdef __cplusplus
+-}
+-#endif
+-#endif /* _CSOLVE_VPSC_H_ */
+
+=== modified file 'src/live_effects/lpe-bendpath.cpp'
+--- src/live_effects/lpe-bendpath.cpp 2009-09-26 20:11:28 +0000
++++ src/live_effects/lpe-bendpath.cpp 2013-12-11 17:05:09 +0000
+@@ -96,6 +96,10 @@
+ bend_path.changed = false;
+ }
+
++ if (uskeleton.empty()) {
++ return pwd2_in; /// \todo or throw an exception instead? might be better to throw an exception so that the UI can display an error message or smth
++ }
++
+ D2<Piecewise<SBasis> > patternd2 = make_cuts_independent(pwd2_in);
+ Piecewise<SBasis> x = vertical_pattern.get_value() ? Piecewise<SBasis>(patternd2[1]) : Piecewise<SBasis>(patternd2[0]);
+ Piecewise<SBasis> y = vertical_pattern.get_value() ? Piecewise<SBasis>(patternd2[0]) : Piecewise<SBasis>(patternd2[1]);
+@@ -107,9 +111,9 @@
+ x-= bboxHorizontal.min();
+ y-= bboxVertical.middle();
+
+- double scaling = uskeleton.cuts.back()/bboxHorizontal.extent();
++ double scaling = uskeleton.cuts.back()/bboxHorizontal.extent();
+
+- if (scaling != 1.0) {
++ if (scaling != 1.0) {
+ x*=scaling;
+ }
+
+@@ -119,7 +123,6 @@
+ if (prop_scale != 1.0) y *= prop_scale;
+ }
+
+-
+ Piecewise<D2<SBasis> > output = compose(uskeleton,x) + y*compose(n,x);
+ return output;
+ }
+
+=== modified file 'src/pencil-context.cpp'
+--- src/pencil-context.cpp 2010-02-08 20:39:21 +0000
++++ src/pencil-context.cpp 2013-12-11 17:05:09 +0000
+@@ -779,11 +779,13 @@
+
+ /* Set up direction of next curve. */
+ {
+- Geom::CubicBezier const * last_seg = dynamic_cast<Geom::CubicBezier const *>(pc->green_curve->last_segment());
+- g_assert( last_seg ); // Relevance: validity of (*last_seg)[2]
++ Geom::Curve const * last_seg = pc->green_curve->last_segment();
++ g_assert( last_seg ); // Relevance: validity of (*last_seg)
+ pc->p[0] = last_seg->finalPoint();
+ pc->npoints = 1;
+- Geom::Point const req_vec( pc->p[0] - (*last_seg)[2] );
++ Geom::Curve *last_seg_reverse = last_seg->reverse();
++ Geom::Point const req_vec( -last_seg_reverse->unitTangentAt(0) );
++ delete last_seg_reverse;
+ pc->req_tangent = ( ( Geom::is_zero(req_vec) || !in_svg_plane(req_vec) )
+ ? Geom::Point(0, 0)
+ : Geom::unit_vector(req_vec) );
+@@ -871,11 +873,13 @@
+
+ /* Set up direction of next curve. */
+ {
+- Geom::CubicBezier const * last_seg = dynamic_cast<Geom::CubicBezier const *>(pc->green_curve->last_segment());
+- g_assert( last_seg ); // Relevance: validity of (*last_seg)[2]
++ Geom::Curve const * last_seg = pc->green_curve->last_segment();
++ g_assert( last_seg ); // Relevance: validity of (*last_seg)
+ pc->p[0] = last_seg->finalPoint();
+ pc->npoints = 1;
+- Geom::Point const req_vec( pc->p[0] - (*last_seg)[2] );
++ Geom::Curve *last_seg_reverse = last_seg->reverse();
++ Geom::Point const req_vec( -last_seg_reverse->unitTangentAt(0) );
++ delete last_seg_reverse;
+ pc->req_tangent = ( ( Geom::is_zero(req_vec) || !in_svg_plane(req_vec) )
+ ? Geom::Point(0, 0)
+ : Geom::unit_vector(req_vec) );
+@@ -916,16 +920,19 @@
+
+ /* Set up direction of next curve. */
+ {
+- Geom::CubicBezier const * last_seg = dynamic_cast<Geom::CubicBezier const *>(pc->red_curve->last_segment());
+- g_assert( last_seg ); // Relevance: validity of (*last_seg)[2]
++ Geom::Curve const * last_seg = pc->red_curve->last_segment();
++ g_assert( last_seg ); // Relevance: validity of (*last_seg)
+ pc->p[0] = last_seg->finalPoint();
+ pc->npoints = 1;
+- Geom::Point const req_vec( pc->p[0] - (*last_seg)[2] );
++ Geom::Curve *last_seg_reverse = last_seg->reverse();
++ Geom::Point const req_vec( -last_seg_reverse->unitTangentAt(0) );
++ delete last_seg_reverse;
+ pc->req_tangent = ( ( Geom::is_zero(req_vec) || !in_svg_plane(req_vec) )
+ ? Geom::Point(0, 0)
+ : Geom::unit_vector(req_vec) );
+ }
+
++
+ pc->green_curve->append_continuous(pc->red_curve, 0.0625);
+ SPCurve *curve = pc->red_curve->copy();
+
+
+=== modified file 'src/registrytool.cpp'
+--- src/registrytool.cpp 2010-03-28 20:17:31 +0000
++++ src/registrytool.cpp 2013-12-11 17:05:09 +0000
+@@ -154,7 +154,7 @@
+ // fullPath.c_str(), path.c_str(), exeName.c_str());
+
+ Glib::ustring keyName =
+- "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\";
++ "HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\";
+ keyName.append(exeName);
+
+ Glib::ustring valueName = "";
+
+=== modified file 'src/remove-last.h'
+--- src/remove-last.h 2007-03-18 18:39:34 +0000
++++ src/remove-last.h 2013-11-19 23:57:37 +0000
+@@ -12,8 +12,9 @@
+
+ typename vector<T>::reverse_iterator i(find(seq.rbegin(), seq.rend(), elem));
+ g_assert( i != seq.rend() );
+- typename vector<T>::iterator ii(&*i);
+- seq.erase(ii);
++ //typename vector<T>::iterator ii(&*i);
++ //seq.erase(ii);
++ seq.erase(i.base());
+ }
+
+
+
+=== modified file 'src/select-context.cpp'
+--- src/select-context.cpp 2010-04-06 14:11:54 +0000
++++ src/select-context.cpp 2013-12-11 17:05:09 +0000
+@@ -844,7 +844,7 @@
+ } else if (MOD__CTRL) {
+ sp_selection_rotate(selection, 90);
+ } else if (snaps) {
+- sp_selection_rotate(selection, 180/snaps);
++ sp_selection_rotate(selection, 180.0/snaps);
+ }
+ ret = TRUE;
+ break;
+@@ -856,7 +856,7 @@
+ } else if (MOD__CTRL) {
+ sp_selection_rotate(selection, -90);
+ } else if (snaps) {
+- sp_selection_rotate(selection, -180/snaps);
++ sp_selection_rotate(selection, -180.0/snaps);
+ }
+ ret = TRUE;
+ break;
+
+=== modified file 'src/sp-conn-end.cpp'
+--- src/sp-conn-end.cpp 2010-02-21 10:40:13 +0000
++++ src/sp-conn-end.cpp 2013-11-19 23:57:37 +0000
+@@ -152,7 +152,7 @@
+ // Set sensible values incase there the connector ends are not
+ // attached to any shapes.
+ Geom::PathVector conn_pv = path->curve->get_pathvector();
+- double endPos[2] = { 0, conn_pv[0].size() };
++ double endPos[2] = { 0, static_cast<double>(conn_pv[0].size()) };
+
+ SPConnEnd** _connEnd = path->connEndPair.getConnEnds();
+ for (unsigned h = 0; h < 2; ++h) {
+
+=== modified file 'src/sp-guide.cpp'
+--- src/sp-guide.cpp 2011-08-21 10:27:43 +0000
++++ src/sp-guide.cpp 2013-11-19 23:57:37 +0000
+@@ -281,10 +281,10 @@
+ Geom::Point B(C[Geom::X], 0);
+ Geom::Point D(0, C[Geom::Y]);
+
+- pts.push_back(std::make_pair<Geom::Point, Geom::Point>(A, B));
+- pts.push_back(std::make_pair<Geom::Point, Geom::Point>(B, C));
+- pts.push_back(std::make_pair<Geom::Point, Geom::Point>(C, D));
+- pts.push_back(std::make_pair<Geom::Point, Geom::Point>(D, A));
++ pts.push_back(std::make_pair(A, B));
++ pts.push_back(std::make_pair(B, C));
++ pts.push_back(std::make_pair(C, D));
++ pts.push_back(std::make_pair(D, A));
+
+ sp_guide_pt_pairs_to_guides(dt, pts);
+
+
+=== modified file 'src/sp-item-rm-unsatisfied-cns.cpp'
+--- src/sp-item-rm-unsatisfied-cns.cpp 2010-01-09 21:14:38 +0000
++++ src/sp-item-rm-unsatisfied-cns.cpp 2013-11-19 23:57:37 +0000
+@@ -24,8 +24,8 @@
+ if (!approx_equal( sp_guide_distance_from_pt(cn.g, snappoints[snappoint_ix].getPoint()), 0) ) {
+ remove_last(cn.g->attached_items, SPGuideAttachment(&item, cn.snappoint_ix));
+ g_assert( i < item.constraints.size() );
+- vector<SPGuideConstraint>::iterator const ei(&item.constraints[i]);
+- item.constraints.erase(ei);
++ // vector<SPGuideConstraint>::iterator const ei(&item.constraints[i]);
++ // item.constraints.erase(ei);
+ }
+ }
+ }
+
+=== modified file 'src/sp-polygon.cpp'
+--- src/sp-polygon.cpp 2009-08-06 14:17:17 +0000
++++ src/sp-polygon.cpp 2013-12-06 15:42:17 +0000
+@@ -123,9 +123,12 @@
+ }
+
+ /* We can safely write points here, because all subclasses require it too (Lauris) */
+- gchar *str = sp_svg_write_polygon(shape->curve->get_pathvector());
+- repr->setAttribute("points", str);
+- g_free(str);
++ /* While saving polygon element without points attribute _curve is NULL (see bug 1202753) */
++ if (shape->curve != NULL) {
++ gchar *str = sp_svg_write_polygon(shape->curve->get_pathvector());
++ repr->setAttribute("points", str);
++ g_free(str);
++ }
+
+ if (((SPObjectClass *) (parent_class))->write) {
+ ((SPObjectClass *) (parent_class))->write(object, xml_doc, repr, flags);
+
+=== modified file 'src/trace/siox.cpp'
+--- src/trace/siox.cpp 2009-01-23 21:55:34 +0000
++++ src/trace/siox.cpp 2013-11-19 23:57:37 +0000
+@@ -21,6 +21,7 @@
+ #include <stdarg.h>
+ #include <map>
+ #include <algorithm>
++#include <cstdlib>
+
+
+ namespace org
+
+=== modified file 'src/ui/dialog/filedialogimpl-gtkmm.cpp'
+--- src/ui/dialog/filedialogimpl-gtkmm.cpp 2010-04-14 15:36:23 +0000
++++ src/ui/dialog/filedialogimpl-gtkmm.cpp 2013-12-11 17:05:09 +0000
+@@ -595,8 +595,9 @@
+ void FileDialogBaseGtk::cleanup( bool showConfirmed )
+ {
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+- if ( showConfirmed )
++ if ( showConfirmed ) {
+ prefs->setBool( preferenceBase + "/enable_preview", previewCheckbox.get_active() );
++ }
+ }
+
+
+@@ -606,6 +607,9 @@
+ set_preview_widget_active(enabled);
+ if ( enabled ) {
+ _updatePreviewCallback();
++ } else {
++ // Clears out any current preview image.
++ svgPreview.showNoPreview();
+ }
+ }
+
+@@ -617,6 +621,7 @@
+ void FileDialogBaseGtk::_updatePreviewCallback()
+ {
+ Glib::ustring fileName = get_preview_filename();
++ bool enabled = previewCheckbox.get_active();
+
+ #ifdef WITH_GNOME_VFS
+ if ( fileName.empty() && gnome_vfs_initialized() ) {
+@@ -624,11 +629,11 @@
+ }
+ #endif
+
+- if (fileName.empty()) {
+- return;
++ if ( enabled && !fileName.empty() ) {
++ svgPreview.set(fileName, _dialogType);
++ } else {
++ svgPreview.showNoPreview();
+ }
+-
+- svgPreview.set(fileName, _dialogType);
+ }
+
+
+
+=== modified file 'src/ui/dialog/filedialogimpl-win32.cpp'
+--- src/ui/dialog/filedialogimpl-win32.cpp 2012-04-04 19:54:14 +0000
++++ src/ui/dialog/filedialogimpl-win32.cpp 2013-11-19 23:57:37 +0000
+@@ -16,6 +16,7 @@
+ #endif
+
+ //General includes
++#include <cmath>
+ #include <list>
+ #include <unistd.h>
+ #include <sys/stat.h>
+@@ -931,8 +932,9 @@
+ const double scaledSvgHeight = scaleFactor * svgHeight;
+
+ Geom::Rect area(Geom::Point(0, 0), Geom::Point(scaledSvgWidth, scaledSvgHeight));
+- NRRectL areaL = {0, 0, scaledSvgWidth, scaledSvgHeight};
+- NRRectL bbox = {0, 0, scaledSvgWidth, scaledSvgHeight};
++ // assume that scaledSvgWidth and scaledSvgHeight are not bigger than largest int
++ NRRectL areaL = {0, 0, static_cast<int>(trunc(scaledSvgWidth)), static_cast<int>(trunc(scaledSvgHeight))};
++ NRRectL bbox = {0, 0, static_cast<int>(trunc(scaledSvgWidth)), static_cast<int>(trunc(scaledSvgHeight))};
+
+ // write object bbox to area
+ Geom::OptRect maybeArea(area);
+
+=== modified file 'src/ui/tool/multi-path-manipulator.cpp'
+--- src/ui/tool/multi-path-manipulator.cpp 2012-01-23 22:51:19 +0000
++++ src/ui/tool/multi-path-manipulator.cpp 2013-12-11 17:05:09 +0000
+@@ -218,10 +218,12 @@
+ SubpathList::iterator last_j;
+ NodeList::iterator last_k;
+ bool anything_found = false;
++ bool anynode_found = false;
+
+ for (MapType::iterator i = _mmap.begin(); i != _mmap.end(); ++i) {
+ SubpathList &sp = i->second->subpathList();
+ for (SubpathList::iterator j = sp.begin(); j != sp.end(); ++j) {
++ anynode_found = true;
+ for (NodeList::iterator k = (*j)->begin(); k != (*j)->end(); ++k) {
+ if (k->selected()) {
+ last_i = i;
+@@ -243,10 +245,12 @@
+ if (!anything_found) {
+ // select first / last node
+ // this should never fail because there must be at least 1 non-empty manipulator
+- if (dir == 1) {
++ if (anynode_found) {
++ if (dir == 1) {
+ _selection.insert((*_mmap.begin()->second->subpathList().begin())->begin().ptr());
+- } else {
++ } else {
+ _selection.insert((--(*--(--_mmap.end())->second->subpathList().end())->end()).ptr());
++ }
+ }
+ return;
+ }
+
+=== modified file 'src/ui/tool/node-tool.cpp'
+--- src/ui/tool/node-tool.cpp 2012-01-23 22:51:19 +0000
++++ src/ui/tool/node-tool.cpp 2013-12-11 17:05:09 +0000
+@@ -174,6 +174,10 @@
+
+ nt->enableGrDrag(false);
+
++ if (nt->flash_tempitem) {
++ nt->desktop->remove_temporary_canvasitem(nt->flash_tempitem);
++ }
++
+ nt->_selection_changed_connection.disconnect();
+ nt->_selection_modified_connection.disconnect();
+ nt->_mouseover_changed_connection.disconnect();
+
+=== modified file 'src/ui/tool/node.h'
+--- src/ui/tool/node.h 2012-01-23 22:51:19 +0000
++++ src/ui/tool/node.h 2013-11-19 23:57:37 +0000
+@@ -16,7 +16,13 @@
+ #include <iosfwd>
+ #include <stdexcept>
+ #include <cstddef>
++
++#if __cplusplus >= 201103L
++#include <functional>
++#else
+ #include <tr1/functional>
++#endif
++
+ #include <boost/utility.hpp>
+ #include <boost/shared_ptr.hpp>
+ #include <boost/optional.hpp>
+@@ -32,11 +38,13 @@
+ }
+ }
+
++#if __cplusplus < 201103L
+ namespace std {
+ namespace tr1 {
+ template <typename N> struct hash< Inkscape::UI::NodeIterator<N> >;
+ }
+ }
++#endif
+
+ namespace Inkscape {
+ namespace UI {
+
+=== modified file 'src/ui/tool/transform-handle-set.cpp'
+--- src/ui/tool/transform-handle-set.cpp 2012-01-23 22:51:19 +0000
++++ src/ui/tool/transform-handle-set.cpp 2013-12-10 03:08:08 +0000
+@@ -325,7 +325,7 @@
+
+ virtual Glib::ustring _getDragTip(GdkEventMotion */*event*/) {
+ return format_tip(C_("Transform handle tip", "Rotate by %.2f°"),
+- _last_angle * 360.0);
++ _last_angle * 180.0 / M_PI);
+ }
+
+ virtual bool _hasDragTips() { return true; }
+
+=== modified file 'src/widgets/eek-preview.cpp'
+--- src/widgets/eek-preview.cpp 2009-03-23 03:16:48 +0000
++++ src/widgets/eek-preview.cpp 2013-11-19 23:57:37 +0000
+@@ -235,7 +235,7 @@
+
+ GdkGC *gc = gdk_gc_new( widget->window );
+ EekPreview* preview = EEK_PREVIEW(widget);
+- GdkColor fg = {0, preview->_r, preview->_g, preview->_b};
++ GdkColor fg = {0, static_cast<guint16>(preview->_r), static_cast<guint16>(preview->_g), static_cast<guint16>(preview->_b)};
+
+ gdk_colormap_alloc_color( gdk_colormap_get_system(), &fg, FALSE, TRUE );
+
+
+=== modified file 'src/widgets/sp-color-icc-selector.cpp'
+--- src/widgets/sp-color-icc-selector.cpp 2012-02-15 06:02:14 +0000
++++ src/widgets/sp-color-icc-selector.cpp 2013-11-19 23:57:37 +0000
+@@ -507,9 +507,9 @@
+ if ( trans ) {
+ guint32 val = _color.toRGBA32(0);
+ guchar pre[4] = {
+- SP_RGBA32_R_U(val),
+- SP_RGBA32_G_U(val),
+- SP_RGBA32_B_U(val),
++ static_cast<guchar>(SP_RGBA32_R_U(val)),
++ static_cast<guchar>(SP_RGBA32_G_U(val)),
++ static_cast<guchar>(SP_RGBA32_B_U(val)),
+ 255};
+ #ifdef DEBUG_LCMS
+ g_message("Shoving in [%02x] [%02x] [%02x]", pre[0], pre[1], pre[2]);
+
+=== modified file 'src/xml/repr-io.cpp'
+--- src/xml/repr-io.cpp 2012-12-05 22:48:00 +0000
++++ src/xml/repr-io.cpp 2013-11-19 23:57:37 +0000
+@@ -88,7 +88,9 @@
+ }
+ }
+
+- int setFile( char const * filename );
++ int setFile( char const * filename, bool load_entities );
++
++ xmlDocPtr readXml();
+
+ static int readCb( void * context, char * buffer, int len );
+ static int closeCb( void * context );
+@@ -102,12 +104,15 @@
+ FILE* fp;
+ unsigned char firstFew[4];
+ int firstFewLen;
++ bool LoadEntities; // Checks for SYSTEM Entities (requires cached data)
++ std::string cachedData;
++ unsigned int cachedPos;
+ Inkscape::URI dummy;
+ Inkscape::IO::UriInputStream* instr;
+ Inkscape::IO::GzipInputStream* gzin;
+ };
+
+-int XmlSource::setFile(char const *filename)
++int XmlSource::setFile(char const *filename, bool load_entities=false)
+ {
+ int retVal = -1;
+
+@@ -165,17 +170,67 @@
+ }
+ }
+
++ if(load_entities) {
++ this->cachedData = std::string("");
++ this->cachedPos = 0;
++
++ // First get data from file in typical way (cache it all)
++ char *buffer = new char [4096];
++ while(true) {
++ int len = this->read(buffer, 4096);
++ if(len <= 0) break;
++ buffer[len] = 0;
++ this->cachedData += buffer;
++ }
++ free(buffer);
++
++ // Check for SYSTEM or PUBLIC entities and remove them from the cache
++ GMatchInfo *info;
++ gint start, end;
++
++ GRegex *regex = g_regex_new(
++ "<!ENTITY\\s+[^>\\s]+\\s+(SYSTEM|PUBLIC\\s+\"[^>\"]+\")\\s+\"[^>\"]+\"\\s*>",
++ G_REGEX_CASELESS, G_REGEX_MATCH_NEWLINE_ANY, NULL);
++
++ g_regex_match (regex, this->cachedData.c_str(), G_REGEX_MATCH_NEWLINE_ANY, &info);
++
++ while (g_match_info_matches (info)) {
++ if (g_match_info_fetch_pos (info, 1, &start, &end))
++ this->cachedData.erase(start, end - start);
++ g_match_info_next (info, NULL);
++ }
++ g_match_info_free(info);
++ g_regex_unref(regex);
++ }
++ // Do this after loading cache, so reads don't return cache to fill cache.
++ this->LoadEntities = load_entities;
+ return retVal;
+ }
+
++xmlDocPtr XmlSource::readXml()
++{
++ int parse_options = XML_PARSE_HUGE | XML_PARSE_RECOVER;
++
++ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
++ bool allowNetAccess = prefs->getBool("/options/externalresources/xml/allow_net_access", false);
++ if (!allowNetAccess) parse_options |= XML_PARSE_NONET;
++
++ // Allow NOENT only if we're filtering out SYSTEM and PUBLIC entities
++ if (LoadEntities) parse_options |= XML_PARSE_NOENT;
++
++ return xmlReadIO( readCb, closeCb, this,
++ filename, getEncoding(), parse_options);
++}
+
+ int XmlSource::readCb( void * context, char * buffer, int len )
+ {
+ int retVal = -1;
++
+ if ( context ) {
+ XmlSource* self = static_cast<XmlSource*>(context);
+ retVal = self->read( buffer, len );
+ }
++
+ return retVal;
+ }
+
+@@ -193,7 +248,15 @@
+ int retVal = 0;
+ size_t got = 0;
+
+- if ( firstFewLen > 0 ) {
++ if ( LoadEntities ) {
++ if (cachedPos >= cachedData.length()) {
++ return -1;
++ } else {
++ retVal = cachedData.copy(buffer, len, cachedPos);
++ cachedPos += retVal;
++ return retVal; // Do NOT continue.
++ }
++ } else if ( firstFewLen > 0 ) {
+ int some = (len < firstFewLen) ? len : firstFewLen;
+ memcpy( buffer, firstFew, some );
+ if ( len < firstFewLen ) {
+@@ -289,22 +352,19 @@
+ XmlSource src;
+
+ if ( (src.setFile(filename) == 0) ) {
+- int parse_options = XML_PARSE_HUGE; // do not use XML_PARSE_NOENT ! see bug lp:1025185
+- Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+- bool allowNetAccess = prefs->getBool("/options/externalresources/xml/allow_net_access", false);
+- if (!allowNetAccess) {
+- parse_options |= XML_PARSE_NONET;
++ doc = src.readXml();
++ rdoc = sp_repr_do_read( doc, default_ns );
++ // For some reason, failed ns loading results in this
++ // We try a system check version of load with NOENT for adobe
++ if(rdoc && strcmp(rdoc->root()->name(), "ns:svg") == 0) {
++ xmlFreeDoc( doc );
++ src.setFile(filename, true);
++ doc = src.readXml();
++ rdoc = sp_repr_do_read( doc, default_ns );
+ }
+- doc = xmlReadIO( XmlSource::readCb,
+- XmlSource::closeCb,
+- &src,
+- localFilename,
+- src.getEncoding(),
+- parse_options);
+ }
+ }
+
+- rdoc = sp_repr_do_read( doc, default_ns );
+ if ( doc ) {
+ xmlFreeDoc( doc );
+ }
+
+--- src/libvpsc/CMakeLists.txt.orig 2013-12-11 09:29:53.000000000 -0800
++++ src/libvpsc/CMakeLists.txt 2013-12-11 09:28:16.000000000 -0800
+@@ -0,0 +1,12 @@
++SET(libvpsc_SRC
++block.cpp
++blocks.cpp
++constraint.cpp
++generate-constraints.cpp
++remove_rectangle_overlap.cpp
++solve_VPSC.cpp
++variable.cpp
++)
++ADD_LIBRARY(vpsc STATIC ${libvpsc_SRC})
++TARGET_LINK_LIBRARIES(vpsc
++${INKSCAPE_LIBS})
Deleted: trunk/dports/graphics/inkscape/files/patch-r9972-thru-r9989.diff
===================================================================
--- trunk/dports/graphics/inkscape/files/patch-r9972-thru-r9989.diff 2013-12-11 23:52:13 UTC (rev 114617)
+++ trunk/dports/graphics/inkscape/files/patch-r9972-thru-r9989.diff 2013-12-11 23:56:18 UTC (rev 114618)
@@ -1,1729 +0,0 @@
-=== modified file 'configure.ac'
---- configure.ac 2013-09-22 00:34:02 +0000
-+++ configure.ac 2013-11-13 21:17:28 +0000
-@@ -168,11 +168,14 @@
- dnl Check for OpenMP
- dnl Replace this with AC_OPENMP once Autoconf 2.62 is widespread
- dnl ******************************
--AX_OPENMP([openmp_ok=yes],[openmp_ok=no])
-+AX_OPENMP([AC_CHECK_HEADER([omp.h],
-+ [openmp_ok=yes],
-+ [openmp_ok=no])
-+])
-+
- if test "x$openmp_ok" = "xyes"; then
- dnl We have it, now set up the flags
- CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
-- AC_CHECK_HEADER(omp.h)
- AC_DEFINE(HAVE_OPENMP, 1, [Use OpenMP])
- fi
-
-
-=== modified file 'src/2geom/sbasis.h'
---- src/2geom/sbasis.h 2009-04-06 22:29:34 +0000
-+++ src/2geom/sbasis.h 2013-11-13 21:17:28 +0000
-@@ -75,10 +75,18 @@
- return d[i];
- }
- Linear& operator[](unsigned i) { return d.at(i); }
-- Linear const* begin() const { return (Linear const*)&*d.begin();}
-- Linear const* end() const { return (Linear const*)&*d.end();}
-- Linear* begin() { return (Linear*)&*d.begin();}
-- Linear* end() { return (Linear*)&*d.end();}
-+
-+ //Linear const* begin() const { return (Linear const*)&*d.begin();}
-+ //Linear const* end() const { return (Linear const*)&*d.end();}
-+ //Linear* begin() { return (Linear*)&*d.begin();}
-+ //Linear* end() { return (Linear*)&*d.end();}
-+
-+ std::vector<Linear>::const_iterator begin() const { return d.begin(); }
-+ std::vector<Linear>::const_iterator end() const { return d.end(); }
-+
-+ std::vector<Linear>::iterator begin() { return d.begin(); }
-+ std::vector<Linear>::iterator end() { return d.end(); }
-+
- bool empty() const {return d.empty();}
- Linear &back() {return d.back();}
- Linear const &back() const {return d.back();}
-@@ -87,7 +95,11 @@
- void resize(unsigned n, Linear const& l) { d.resize(n, l);}
- void reserve(unsigned n) { d.reserve(n);}
- void clear() {d.clear();}
-- void insert(Linear* before, const Linear* src_begin, const Linear* src_end) { d.insert(std::vector<Linear>::iterator(before), src_begin, src_end);}
-+
-+ void insert(std::vector<Linear>::iterator before, std::vector<Linear>::const_iterator src_begin, std::vector<Linear>::const_iterator src_end) {
-+ d.insert(before, src_begin, src_end);
-+ }
-+
- //void insert(Linear* aa, Linear* bb, Linear* cc} { d.insert(aa, bb, cc);}
- Linear& at(unsigned i) { return d.at(i);}
- //void insert(Linear* before, int& n, Linear const &l) { d.insert(std::vector<Linear>::iterator(before), n, l);}
-@@ -283,7 +295,13 @@
-
- inline SBasis truncate(SBasis const &a, unsigned terms) {
- SBasis c;
-- c.insert(c.begin(), a.begin(), a.begin() + std::min(terms, (unsigned)a.size()));
-+
-+ std::vector<Linear>::const_iterator e = a.begin();
-+ std::advance(e, std::min(terms, (unsigned)a.size()));
-+
-+ //c.insert(c.begin(), a.begin(), a.begin() + std::min(terms, (unsigned)a.size()));
-+ c.insert(c.begin(), a.begin(), e);
-+
- return c;
- }
-
-
-=== modified file 'src/color-profile.cpp'
---- src/color-profile.cpp 2013-09-21 22:19:03 +0000
-+++ src/color-profile.cpp 2013-11-13 21:17:28 +0000
-@@ -639,9 +639,9 @@
-
- cmsUInt8Number outofgamut = 0;
- guchar check_color[4] = {
-- SP_RGBA32_R_U(val),
-- SP_RGBA32_G_U(val),
-- SP_RGBA32_B_U(val),
-+ static_cast<guchar>(SP_RGBA32_R_U(val)),
-+ static_cast<guchar>(SP_RGBA32_G_U(val)),
-+ static_cast<guchar>(SP_RGBA32_B_U(val)),
- 255};
- cmsDoTransform(ColorProfile::getTransfGamutCheck(), &check_color, &outofgamut, 1);
-
-
-=== modified file 'src/dom/io/uristream.cpp'
---- src/dom/io/uristream.cpp 2009-02-26 21:28:12 +0000
-+++ src/dom/io/uristream.cpp 2013-11-13 21:17:28 +0000
-@@ -54,7 +54,7 @@
- *
- */
- UriInputStream::UriInputStream(const URI &source)
-- throw (StreamException): uri((URI &)source)
-+ : uri((URI &)source)
- {
- init();
- }
-@@ -62,7 +62,7 @@
- /**
- *
- */
--void UriInputStream::init() throw (StreamException)
-+void UriInputStream::init()
- {
- //get information from uri
- scheme = uri.getScheme();
-@@ -116,7 +116,7 @@
- /**
- *
- */
--UriInputStream::~UriInputStream() throw(StreamException)
-+UriInputStream::~UriInputStream()
- {
- close();
- }
-@@ -126,7 +126,7 @@
- * this input stream without blocking by the next caller of a method for
- * this input stream.
- */
--int UriInputStream::available() throw(StreamException)
-+int UriInputStream::available()
- {
- return 0;
- }
-@@ -136,7 +136,7 @@
- * Closes this input stream and releases any system resources
- * associated with the stream.
- */
--void UriInputStream::close() throw(StreamException)
-+void UriInputStream::close()
- {
- if (closed)
- return;
-@@ -175,7 +175,7 @@
- /**
- * Reads the next byte of data from the input stream. -1 if EOF
- */
--int UriInputStream::get() throw(StreamException)
-+int UriInputStream::get()
- {
- int retVal = -1;
- if (closed)
-@@ -232,7 +232,7 @@
- /**
- *
- */
--UriReader::UriReader(const URI &uri) throw (StreamException)
-+UriReader::UriReader(const URI &uri)
- {
- inputStream = new UriInputStream(uri);
- }
-@@ -240,7 +240,7 @@
- /**
- *
- */
--UriReader::~UriReader() throw (StreamException)
-+UriReader::~UriReader()
- {
- delete inputStream;
- }
-@@ -248,7 +248,7 @@
- /**
- *
- */
--int UriReader::available() throw(StreamException)
-+int UriReader::available()
- {
- return inputStream->available();
- }
-@@ -256,7 +256,7 @@
- /**
- *
- */
--void UriReader::close() throw(StreamException)
-+void UriReader::close()
- {
- inputStream->close();
- }
-@@ -264,7 +264,7 @@
- /**
- *
- */
--int UriReader::get() throw(StreamException)
-+int UriReader::get()
- {
- int ch = (int)inputStream->get();
- return ch;
-@@ -279,10 +279,10 @@
- *
- */
- UriOutputStream::UriOutputStream(const URI &destination)
-- throw (StreamException): closed(false),
-- ownsFile(true),
-- outf(NULL),
-- uri((URI &)destination)
-+ : closed(false),
-+ ownsFile(true),
-+ outf(NULL),
-+ uri((URI &)destination)
- {
- init();
- }
-@@ -291,7 +291,7 @@
- /**
- *
- */
--void UriOutputStream::init() throw(StreamException)
-+void UriOutputStream::init()
- {
- //get information from uri
- scheme = uri.getScheme();
-@@ -328,7 +328,7 @@
- /**
- *
- */
--UriOutputStream::~UriOutputStream() throw(StreamException)
-+UriOutputStream::~UriOutputStream()
- {
- close();
- }
-@@ -337,7 +337,7 @@
- * Closes this output stream and releases any system resources
- * associated with this stream.
- */
--void UriOutputStream::close() throw(StreamException)
-+void UriOutputStream::close()
- {
- if (closed)
- return;
-@@ -372,7 +372,7 @@
- * Flushes this output stream and forces any buffered output
- * bytes to be written out.
- */
--void UriOutputStream::flush() throw(StreamException)
-+void UriOutputStream::flush()
- {
- if (closed)
- return;
-@@ -401,7 +401,7 @@
- /**
- * Writes the specified byte to this output stream.
- */
--int UriOutputStream::put(XMLCh ch) throw(StreamException)
-+int UriOutputStream::put(XMLCh ch)
- {
- if (closed)
- return -1;
-@@ -437,7 +437,6 @@
- *
- */
- UriWriter::UriWriter(const URI &uri)
-- throw (StreamException)
- {
- outputStream = new UriOutputStream(uri);
- }
-@@ -445,7 +444,7 @@
- /**
- *
- */
--UriWriter::~UriWriter() throw (StreamException)
-+UriWriter::~UriWriter()
- {
- delete outputStream;
- }
-@@ -453,7 +452,7 @@
- /**
- *
- */
--void UriWriter::close() throw(StreamException)
-+void UriWriter::close()
- {
- outputStream->close();
- }
-@@ -461,7 +460,7 @@
- /**
- *
- */
--void UriWriter::flush() throw(StreamException)
-+void UriWriter::flush()
- {
- outputStream->flush();
- }
-@@ -469,7 +468,7 @@
- /**
- *
- */
--int UriWriter::put(XMLCh ch) throw(StreamException)
-+int UriWriter::put(XMLCh ch)
- {
- int ich = (int)ch;
- if (outputStream->put(ich) < 0)
-
-=== modified file 'src/dom/io/uristream.h'
---- src/dom/io/uristream.h 2008-04-29 02:00:54 +0000
-+++ src/dom/io/uristream.h 2013-11-13 21:17:28 +0000
-@@ -65,19 +65,19 @@
-
- public:
-
-- UriInputStream(const URI &source) throw(StreamException);
--
-- virtual ~UriInputStream() throw(StreamException);
--
-- virtual int available() throw(StreamException);
--
-- virtual void close() throw(StreamException);
--
-- virtual int get() throw(StreamException);
-+ UriInputStream(const URI &source);
-+
-+ virtual ~UriInputStream();
-+
-+ virtual int available();
-+
-+ virtual void close();
-+
-+ virtual int get();
-
- private:
-
-- void init() throw(StreamException);//common code called by constructor
-+ void init() ;//common code called by constructor
-
- bool closed;
-
-@@ -106,15 +106,15 @@
-
- public:
-
-- UriReader(const URI &source) throw(StreamException);
--
-- virtual ~UriReader() throw(StreamException);
--
-- virtual int available() throw(StreamException);
--
-- virtual void close() throw(StreamException);
--
-- virtual int get() throw(StreamException);
-+ UriReader(const URI &source);
-+
-+ virtual ~UriReader();
-+
-+ virtual int available();
-+
-+ virtual void close();
-+
-+ virtual int get();
-
- private:
-
-@@ -138,19 +138,19 @@
-
- public:
-
-- UriOutputStream(const URI &destination) throw(StreamException);
--
-- virtual ~UriOutputStream() throw(StreamException);
--
-- virtual void close() throw(StreamException);
--
-- virtual void flush() throw(StreamException);
--
-- virtual int put(XMLCh ch) throw(StreamException);
-+ UriOutputStream(const URI &destination);
-+
-+ virtual ~UriOutputStream();
-+
-+ virtual void close();
-+
-+ virtual void flush();
-+
-+ virtual int put(XMLCh ch);
-
- private:
-
-- void init() throw(StreamException); //common code called by constructor
-+ void init() ; //common code called by constructor
-
- bool closed;
- bool ownsFile;
-@@ -179,15 +179,15 @@
-
- public:
-
-- UriWriter(const URI &source) throw(StreamException);
--
-- virtual ~UriWriter() throw(StreamException);
--
-- virtual void close() throw(StreamException);
--
-- virtual void flush() throw(StreamException);
--
-- virtual int put(XMLCh ch) throw(StreamException);
-+ UriWriter(const URI &source) ;
-+
-+ virtual ~UriWriter() ;
-+
-+ virtual void close() ;
-+
-+ virtual void flush() ;
-+
-+ virtual int put(XMLCh ch) ;
-
- private:
-
-
-=== modified file 'src/dom/svgimpl.cpp'
---- src/dom/svgimpl.cpp 2008-06-11 21:23:49 +0000
-+++ src/dom/svgimpl.cpp 2013-11-13 21:17:28 +0000
-@@ -81,7 +81,7 @@
- typedef struct
- {
- const char *name;
-- int type;
-+ unsigned int type;
- } SVGTableEntry;
-
-
-@@ -266,9 +266,9 @@
- * Return the string corresponding to a given SVG element type enum
- * Return "unknown" if not found
- */
--const char *svgInterfaceEnumToStr(int type)
-+const char *svgInterfaceEnumToStr(unsigned int type)
- {
-- if (type < 1 || type > (int)SVG_ZOOM_AND_PAN)
-+ if (type < 1 || type > SVG_ZOOM_AND_PAN)
- return "unknown";
- SVGTableEntry *entry = interfaceTable;
- for (int i = 0 ; i < SVG_NR_INTERFACES ; i++)
-
-=== modified file 'src/io/inkjar.cpp'
---- src/io/inkjar.cpp 2011-07-20 20:17:25 +0000
-+++ src/io/inkjar.cpp 2013-11-13 21:17:28 +0000
-@@ -68,7 +68,8 @@
- {
- _filename = g_strdup(new_filename);
- _last_filename = NULL;
-- fd = -1;
-+ //fd = -1;
-+fd=NULL;
- }
-
- //fixme: the following should probably just return a const gchar* and not
-@@ -102,9 +103,11 @@
- return true;
- }
-
-+#include <cstdio>
-+
- bool JarFile::open()
- {
-- if ((fd = ::open(_filename, O_RDONLY)) < 0) {
-+ if ((fd = fopen(_filename, O_RDONLY)) < 0) {
- fprintf(stderr, "open failed.\n");
- return false;
- }
-@@ -116,7 +119,7 @@
-
- bool JarFile::close()
- {
-- if (fd >= 0 && !::close(fd)) {
-+ if (fd >= 0 && !fclose(fd)) {
- inflateEnd(&_zs);
- return true;
- }
-@@ -256,7 +259,7 @@
-
- if (method == 8 || flags & 0x0008) {
- unsigned int file_length = 0;//uncompressed file length
-- lseek(fd, eflen, SEEK_CUR);
-+ fseek(fd, eflen, SEEK_CUR);
- guint8 *file_data = get_compressed_file(compressed_size, file_length,
- crc, flags);
- if (file_data == NULL) {
-@@ -274,7 +277,7 @@
- }
- g_byte_array_append(gba, file_data, compressed_size);
- } else {
-- lseek(fd, compressed_size+eflen, SEEK_CUR);
-+ fseek(fd, compressed_size+eflen, SEEK_CUR);
- g_byte_array_free(gba, FALSE);
- return NULL;
- }
-@@ -313,8 +316,8 @@
- std::printf("%d bytes written\n", out_a);
- #endif
- }
-- lseek(fd, eflen, SEEK_CUR);
- g_free(bytes);
-+ fseek(fd, eflen, SEEK_CUR);
-
- if (!check_crc(crc, crc2, flags)) {
- bytes = gba->data;
-@@ -328,7 +331,8 @@
- int JarFile::read(guint8 *buf, int count)
- {
- int nbytes;
-- if ((nbytes = ::read(fd, buf, count)) != count) {
-+ //if ((nbytes = ::read(fd, buf, count)) != count) {
-+if ((nbytes = fread(buf, 1, count, fd)) != count) {
- fprintf(stderr, "read error\n");
- exit(1);
- return 0;
-@@ -357,9 +361,12 @@
-
- if (!_zs.avail_in) {
-
-- if ((nbytes = ::read(fd, in_buffer,
-+ /*if ((nbytes = ::read(fd, in_buffer,
- (leftover_in < RDSZ ? leftover_in : RDSZ)))
- < 0) {
-+*/
-+if ((nbytes = fread(in_buffer, 1, (leftover_in < RDSZ ? leftover_in : RDSZ), fd))
-+< 0) {
- fprintf(stderr, "jarfile read error");
- }
- _zs.avail_in = nbytes;
-@@ -537,7 +544,8 @@
- }
- }
- } else if (gba->len > 0)
-- ::write(1, gba->data, gba->len);
-+ //::write(1, gba->data, gba->len);
-+fwrite(gba->data, 1, gba-len, stdout);
- else
- break;
- }
-
-=== modified file 'src/io/inkjar.h'
---- src/io/inkjar.h 2011-12-08 22:05:10 +0000
-+++ src/io/inkjar.h 2013-11-13 21:17:28 +0000
-@@ -27,6 +27,7 @@
- #endif
-
- #include <glib.h>
-+#include <stdio.h>
-
- namespace Inkjar {
-
-@@ -91,7 +92,7 @@
- class JarFile {
- public:
-
-- JarFile() : fd(-1), _filename(NULL), _last_filename(NULL) {}
-+ JarFile() : fd(NULL), _filename(NULL), _last_filename(NULL) {}
- virtual ~JarFile();
- JarFile(gchar const *new_filename);
-
-@@ -106,7 +107,8 @@
-
- private:
-
-- int fd;
-+// int fd;
-+FILE* fd;
- gchar *_filename;
- z_stream _zs;
- gchar *_last_filename;
-
-=== modified file 'src/io/uristream.cpp'
---- src/io/uristream.cpp 2009-08-02 15:04:57 +0000
-+++ src/io/uristream.cpp 2013-11-13 21:17:28 +0000
-@@ -104,7 +104,7 @@
- *
- */
- UriInputStream::UriInputStream(Inkscape::URI &source)
-- throw (StreamException): uri(source)
-+ : uri(source)
- {
- //get information from uri
- char const *schemestr = uri.getScheme();
-@@ -146,8 +146,8 @@
- *
- */
- UriInputStream::UriInputStream(FILE *source, Inkscape::URI &uri)
-- throw (StreamException): inf(source),
-- uri(uri)
-+ : inf(source),
-+ uri(uri)
- {
- scheme = SCHEME_FILE;
- if (!inf) {
-@@ -160,7 +160,7 @@
- /**
- *
- */
--UriInputStream::~UriInputStream() throw(StreamException)
-+UriInputStream::~UriInputStream()
- {
- close();
- }
-@@ -170,7 +170,7 @@
- * this input stream without blocking by the next caller of a method for
- * this input stream.
- */
--int UriInputStream::available() throw(StreamException)
-+int UriInputStream::available()
- {
- return 0;
- }
-@@ -180,7 +180,7 @@
- * Closes this input stream and releases any system resources
- * associated with the stream.
- */
--void UriInputStream::close() throw(StreamException)
-+void UriInputStream::close()
- {
- if (closed)
- return;
-@@ -207,7 +207,7 @@
- /**
- * Reads the next byte of data from the input stream. -1 if EOF
- */
--int UriInputStream::get() throw(StreamException)
-+int UriInputStream::get()
- {
- int retVal = -1;
- if (!closed)
-@@ -249,7 +249,6 @@
- *
- */
- UriReader::UriReader(Inkscape::URI &uri)
-- throw (StreamException)
- {
- inputStream = new UriInputStream(uri);
- }
-@@ -257,7 +256,7 @@
- /**
- *
- */
--UriReader::~UriReader() throw (StreamException)
-+UriReader::~UriReader()
- {
- delete inputStream;
- }
-@@ -265,7 +264,7 @@
- /**
- *
- */
--int UriReader::available() throw(StreamException)
-+int UriReader::available()
- {
- return inputStream->available();
- }
-@@ -273,7 +272,7 @@
- /**
- *
- */
--void UriReader::close() throw(StreamException)
-+void UriReader::close()
- {
- inputStream->close();
- }
-@@ -281,7 +280,7 @@
- /**
- *
- */
--gunichar UriReader::get() throw(StreamException)
-+gunichar UriReader::get()
- {
- gunichar ch = (gunichar)inputStream->get();
- return ch;
-@@ -296,11 +295,11 @@
- * Temporary kludge
- */
- UriOutputStream::UriOutputStream(FILE* fp, Inkscape::URI &destination)
-- throw (StreamException): closed(false),
-- ownsFile(false),
-- outf(fp),
-- uri(destination),
-- scheme(SCHEME_FILE)
-+ : closed(false),
-+ ownsFile(false),
-+ outf(fp),
-+ uri(destination),
-+ scheme(SCHEME_FILE)
- {
- if (!outf) {
- Glib::ustring err = "UriOutputStream given null file ";
-@@ -312,11 +311,11 @@
- *
- */
- UriOutputStream::UriOutputStream(Inkscape::URI &destination)
-- throw (StreamException): closed(false),
-- ownsFile(true),
-- outf(NULL),
-- uri(destination),
-- scheme(SCHEME_FILE)
-+ : closed(false),
-+ ownsFile(true),
-+ outf(NULL),
-+ uri(destination),
-+ scheme(SCHEME_FILE)
- {
- //get information from uri
- char const *schemestr = uri.getScheme();
-@@ -353,7 +352,7 @@
- /**
- *
- */
--UriOutputStream::~UriOutputStream() throw(StreamException)
-+UriOutputStream::~UriOutputStream()
- {
- close();
- }
-@@ -362,7 +361,7 @@
- * Closes this output stream and releases any system resources
- * associated with this stream.
- */
--void UriOutputStream::close() throw(StreamException)
-+void UriOutputStream::close()
- {
- if (closed)
- return;
-@@ -391,7 +390,7 @@
- * Flushes this output stream and forces any buffered output
- * bytes to be written out.
- */
--void UriOutputStream::flush() throw(StreamException)
-+void UriOutputStream::flush()
- {
- if (closed)
- return;
-@@ -415,7 +414,7 @@
- /**
- * Writes the specified byte to this output stream.
- */
--void UriOutputStream::put(int ch) throw(StreamException)
-+void UriOutputStream::put(int ch)
- {
- if (closed)
- return;
-@@ -453,7 +452,6 @@
- *
- */
- UriWriter::UriWriter(Inkscape::URI &uri)
-- throw (StreamException)
- {
- outputStream = new UriOutputStream(uri);
- }
-@@ -461,7 +459,7 @@
- /**
- *
- */
--UriWriter::~UriWriter() throw (StreamException)
-+UriWriter::~UriWriter()
- {
- delete outputStream;
- }
-@@ -469,7 +467,7 @@
- /**
- *
- */
--void UriWriter::close() throw(StreamException)
-+void UriWriter::close()
- {
- outputStream->close();
- }
-@@ -477,7 +475,7 @@
- /**
- *
- */
--void UriWriter::flush() throw(StreamException)
-+void UriWriter::flush()
- {
- outputStream->flush();
- }
-@@ -485,7 +483,7 @@
- /**
- *
- */
--void UriWriter::put(gunichar ch) throw(StreamException)
-+void UriWriter::put(gunichar ch)
- {
- int ich = (int)ch;
- outputStream->put(ich);
-
-=== modified file 'src/io/uristream.h'
---- src/io/uristream.h 2006-01-16 02:36:01 +0000
-+++ src/io/uristream.h 2013-11-13 21:17:28 +0000
-@@ -35,17 +35,17 @@
- {
-
- public:
-- UriInputStream(FILE *source, Inkscape::URI &uri) throw(StreamException);
--
-- UriInputStream(Inkscape::URI &source) throw(StreamException);
--
-- virtual ~UriInputStream() throw(StreamException);
--
-- virtual int available() throw(StreamException);
--
-- virtual void close() throw(StreamException);
--
-- virtual int get() throw(StreamException);
-+ UriInputStream(FILE *source, Inkscape::URI &uri);
-+
-+ UriInputStream(Inkscape::URI &source);
-+
-+ virtual ~UriInputStream();
-+
-+ virtual int available();
-+
-+ virtual void close();
-+
-+ virtual int get();
-
- private:
-
-@@ -74,15 +74,15 @@
-
- public:
-
-- UriReader(Inkscape::URI &source) throw(StreamException);
--
-- virtual ~UriReader() throw(StreamException);
--
-- virtual int available() throw(StreamException);
--
-- virtual void close() throw(StreamException);
--
-- virtual gunichar get() throw(StreamException);
-+ UriReader(Inkscape::URI &source);
-+
-+ virtual ~UriReader();
-+
-+ virtual int available();
-+
-+ virtual void close();
-+
-+ virtual gunichar get();
-
- private:
-
-@@ -106,17 +106,17 @@
-
- public:
-
-- UriOutputStream(FILE *fp, Inkscape::URI &destination) throw(StreamException);
--
-- UriOutputStream(Inkscape::URI &destination) throw(StreamException);
--
-- virtual ~UriOutputStream() throw(StreamException);
--
-- virtual void close() throw(StreamException);
--
-- virtual void flush() throw(StreamException);
--
-- virtual void put(int ch) throw(StreamException);
-+ UriOutputStream(FILE *fp, Inkscape::URI &destination);
-+
-+ UriOutputStream(Inkscape::URI &destination);
-+
-+ virtual ~UriOutputStream();
-+
-+ virtual void close();
-+
-+ virtual void flush();
-+
-+ virtual void put(int ch);
-
- private:
-
-@@ -145,15 +145,15 @@
-
- public:
-
-- UriWriter(Inkscape::URI &source) throw(StreamException);
--
-- virtual ~UriWriter() throw(StreamException);
--
-- virtual void close() throw(StreamException);
--
-- virtual void flush() throw(StreamException);
--
-- virtual void put(gunichar ch) throw(StreamException);
-+ UriWriter(Inkscape::URI &source);
-+
-+ virtual ~UriWriter();
-+
-+ virtual void close();
-+
-+ virtual void flush();
-+
-+ virtual void put(gunichar ch);
-
- private:
-
-
-=== modified file 'src/io/xsltstream.cpp'
---- src/io/xsltstream.cpp 2008-05-04 16:09:41 +0000
-+++ src/io/xsltstream.cpp 2013-11-13 21:17:28 +0000
-@@ -30,7 +30,6 @@
- *
- */
- XsltStyleSheet::XsltStyleSheet(InputStream &xsltSource)
-- throw (StreamException)
- : stylesheet(NULL)
- {
- if (!read(xsltSource)) {
-@@ -86,7 +85,6 @@
- *
- */
- XsltInputStream::XsltInputStream(InputStream &xmlSource, XsltStyleSheet &sheet)
-- throw (StreamException)
- : BasicInputStream(xmlSource), stylesheet(sheet)
- {
- //Load the data
-@@ -110,7 +108,7 @@
- /**
- *
- */
--XsltInputStream::~XsltInputStream() throw (StreamException)
-+XsltInputStream::~XsltInputStream()
- {
- xmlFree(outbuf);
- }
-@@ -120,7 +118,7 @@
- * this input stream without blocking by the next caller of a method for
- * this input stream.
- */
--int XsltInputStream::available() throw (StreamException)
-+int XsltInputStream::available()
- {
- return outsize - outpos;
- }
-@@ -130,7 +128,7 @@
- * Closes this input stream and releases any system resources
- * associated with the stream.
- */
--void XsltInputStream::close() throw (StreamException)
-+void XsltInputStream::close()
- {
- closed = true;
- }
-@@ -138,7 +136,7 @@
- /**
- * Reads the next byte of data from the input stream. -1 if EOF
- */
--int XsltInputStream::get() throw (StreamException)
-+int XsltInputStream::get()
- {
- if (closed)
- return -1;
-@@ -161,7 +159,6 @@
- *
- */
- XsltOutputStream::XsltOutputStream(OutputStream &dest, XsltStyleSheet &sheet)
-- throw (StreamException)
- : BasicOutputStream(dest), stylesheet(sheet)
- {
- flushed = false;
-@@ -170,7 +167,7 @@
- /**
- *
- */
--XsltOutputStream::~XsltOutputStream() throw (StreamException)
-+XsltOutputStream::~XsltOutputStream()
- {
- //do not automatically close
- }
-@@ -179,7 +176,7 @@
- * Closes this output stream and releases any system resources
- * associated with this stream.
- */
--void XsltOutputStream::close() throw (StreamException)
-+void XsltOutputStream::close()
- {
- flush();
- destination.close();
-@@ -189,7 +186,7 @@
- * Flushes this output stream and forces any buffered output
- * bytes to be written out.
- */
--void XsltOutputStream::flush() throw (StreamException)
-+void XsltOutputStream::flush()
- {
- if (flushed)
- {
-@@ -230,7 +227,7 @@
- /**
- * Writes the specified byte to this output stream.
- */
--void XsltOutputStream::put(int ch) throw (StreamException)
-+void XsltOutputStream::put(int ch)
- {
- gunichar uch = (gunichar) ch;
- outbuf.push_back(uch);
-
-=== modified file 'src/io/xsltstream.h'
---- src/io/xsltstream.h 2008-05-04 16:09:41 +0000
-+++ src/io/xsltstream.h 2013-11-13 21:17:28 +0000
-@@ -38,7 +38,7 @@
- /**
- * Constructor with loading
- */
-- XsltStyleSheet(InputStream &source) throw (StreamException);
-+ XsltStyleSheet(InputStream &source) ;
-
- /**
- * Simple constructor, no loading
-@@ -73,16 +73,15 @@
-
- public:
-
-- XsltInputStream(InputStream &xmlSource, XsltStyleSheet &stylesheet)
-- throw (StreamException);
--
-- virtual ~XsltInputStream() throw (StreamException);
--
-- virtual int available() throw (StreamException);
--
-- virtual void close() throw (StreamException);
--
-- virtual int get() throw (StreamException);
-+ XsltInputStream(InputStream &xmlSource, XsltStyleSheet &stylesheet);
-+
-+ virtual ~XsltInputStream();
-+
-+ virtual int available();
-+
-+ virtual void close();
-+
-+ virtual int get();
-
-
- private:
-@@ -110,16 +109,15 @@
-
- public:
-
-- XsltOutputStream(OutputStream &destination, XsltStyleSheet &stylesheet)
-- throw (StreamException);
--
-- virtual ~XsltOutputStream() throw (StreamException);
--
-- virtual void close() throw (StreamException);
--
-- virtual void flush() throw (StreamException);
--
-- virtual void put(int ch) throw (StreamException);
-+ XsltOutputStream(OutputStream &destination, XsltStyleSheet &stylesheet);
-+
-+ virtual ~XsltOutputStream();
-+
-+ virtual void close();
-+
-+ virtual void flush();
-+
-+ virtual void put(int ch);
-
- private:
-
-
-=== modified file 'src/libgdl/gdl-dock-object.h'
---- src/libgdl/gdl-dock-object.h 2011-06-04 06:04:06 +0000
-+++ src/libgdl/gdl-dock-object.h 2013-11-13 21:17:28 +0000
-@@ -215,7 +215,7 @@
- G_STMT_START { \
- g_log (G_LOG_DOMAIN, \
- G_LOG_LEVEL_DEBUG, \
-- "%s:%d (%s) %s [%p %d%s:%d]: "format, \
-+ "%s:%d (%s) %s [%p %d%s:%d]: " format, \
- __FILE__, \
- __LINE__, \
- __PRETTY_FUNCTION__, \
-
-=== modified file 'src/libgdl/gdl-tools.h'
---- src/libgdl/gdl-tools.h 2011-06-04 06:04:06 +0000
-+++ src/libgdl/gdl-tools.h 2013-11-13 21:17:28 +0000
-@@ -48,7 +48,7 @@
- #define GDL_TRACE_EXTRA(format, args...) G_STMT_START { \
- g_log (G_LOG_DOMAIN, \
- G_LOG_LEVEL_DEBUG, \
-- "file %s: line %d (%s): "format, \
-+ "file %s: line %d (%s): " format, \
- __FILE__, \
- __LINE__, \
- __PRETTY_FUNCTION__, \
-
-=== modified file 'src/libnrtype/Layout-TNG-OutIter.cpp'
---- src/libnrtype/Layout-TNG-OutIter.cpp 2009-12-29 19:46:02 +0000
-+++ src/libnrtype/Layout-TNG-OutIter.cpp 2013-11-13 21:17:28 +0000
-@@ -197,7 +197,23 @@
-
- Layout::iterator Layout::sourceToIterator(void *source_cookie) const
- {
-- return sourceToIterator(source_cookie, Glib::ustring::const_iterator(std::string::const_iterator(NULL)));
-+ //return sourceToIterator(source_cookie, Glib::ustring::const_iterator(std::string::const_iterator(NULL)));
-+
-+ // simply copied from above... what is an iterator to NULL?
-+ unsigned source_index;
-+ if (_characters.empty()) return end();
-+ for (source_index = 0 ; source_index < _input_stream.size() ; source_index++)
-+ if (_input_stream[source_index]->source_cookie == source_cookie) break;
-+ if (source_index == _input_stream.size()) return end();
-+
-+ unsigned char_index = _sourceToCharacter(source_index);
-+
-+ if (_input_stream[source_index]->Type() != TEXT_SOURCE)
-+ return iterator(this, char_index);
-+
-+ InputStreamTextSource const *text_source = static_cast<InputStreamTextSource const *>(_input_stream[source_index]);
-+ //if (text_iterator <= text_source->text_begin) return iterator(this, char_index);
-+ return iterator(this, char_index);
- }
-
- Geom::OptRect Layout::glyphBoundingBox(iterator const &it, double *rotation) const
-@@ -506,18 +522,23 @@
- *source_cookie = stream_item->source_cookie;
- if (text_iterator && stream_item->Type() == TEXT_SOURCE) {
- InputStreamTextSource const *text_source = static_cast<InputStreamTextSource const *>(stream_item);
-- Glib::ustring::const_iterator text_iter_const = text_source->text_begin;
-+ //Glib::ustring::const_iterator text_iter_const = text_source->text_begin;
-+ Glib::ustring::iterator text_iter = const_cast<Glib::ustring*>(text_source->text)->begin();
- unsigned char_index = it._char_index;
- unsigned original_input_source_index = _spans[_characters[char_index].in_span].in_input_stream_item;
- // confusing algorithm because the iterator goes forwards while the index goes backwards.
- // It's just that it's faster doing it that way
- while (char_index && _spans[_characters[char_index - 1].in_span].in_input_stream_item == original_input_source_index) {
-- ++text_iter_const;
-+ //++text_iter_const;
-+ ++text_iter;
- char_index--;
- }
-- text_source->text->begin().base() + (text_iter_const.base() - text_source->text->begin().base());
-- *text_iterator = Glib::ustring::iterator(std::string::iterator(const_cast<char*>(&*text_source->text->begin().base() + (text_iter_const.base() - text_source->text->begin().base()))));
-+ //text_source->text->begin().base() + (text_iter_const.base() - text_source->text->begin().base());
-+
-+ // FIXME C++11
-+ //*text_iterator = Glib::ustring::iterator(std::string::iterator(const_cast<char*>(&*text_source->text->begin().base() + (text_iter_const.base() - text_source->text->begin().base()))));
- // the caller owns the string, so they're going to want a non-const iterator
-+ *text_iterator = text_iter;
- }
- }
-
-
-=== modified file 'src/libvpsc/Makefile_insert'
---- src/libvpsc/Makefile_insert 2007-03-22 00:37:48 +0000
-+++ src/libvpsc/Makefile_insert 2013-11-13 21:17:28 +0000
-@@ -11,7 +11,6 @@
- libvpsc/pairingheap/PairingHeap.cpp\
- libvpsc/remove_rectangle_overlap.cpp\
- libvpsc/solve_VPSC.cpp\
-- libvpsc/csolve_VPSC.cpp\
- libvpsc/variable.cpp\
- libvpsc/block.h\
- libvpsc/blocks.h\
-@@ -21,5 +20,4 @@
- libvpsc/pairingheap/dsexceptions.h\
- libvpsc/remove_rectangle_overlap.h\
- libvpsc/solve_VPSC.h\
-- libvpsc/csolve_VPSC.h\
- libvpsc/variable.h
-
-=== removed file 'src/libvpsc/csolve_VPSC.cpp'
---- src/libvpsc/csolve_VPSC.cpp 2008-01-31 19:06:59 +0000
-+++ src/libvpsc/csolve_VPSC.cpp 1970-01-01 00:00:00 +0000
-@@ -1,126 +0,0 @@
--/**
-- * \brief Bridge for C programs to access solve_VPSC (which is in C++)
-- *
-- * Authors:
-- * Tim Dwyer <tgdwyer at gmail.com>
-- *
-- * Copyright (C) 2005 Authors
-- *
-- * Released under GNU LGPL. Read the file 'COPYING' for more information.
-- */
--#include <iostream>
--#include <cassert>
--#include <cstdlib>
--#include "variable.h"
--#include "constraint.h"
--#include "generate-constraints.h"
--#include "solve_VPSC.h"
--#include "csolve_VPSC.h"
--using namespace vpsc;
--extern "C" {
--Variable* newVariable(int id, double desiredPos, double weight) {
-- return new Variable(id,desiredPos,weight);
--}
--Constraint* newConstraint(Variable* left, Variable* right, double gap) {
-- return new Constraint(left,right,gap);
--}
--Solver* newSolver(int n, Variable* vs[], int m, Constraint* cs[]) {
-- return new Solver(n,vs,m,cs);
--}
--Solver* newIncSolver(int n, Variable* vs[], int m, Constraint* cs[]) {
-- return (Solver*)new vpsc::IncSolver(n,vs,m,cs);
--}
--
--int genXConstraints(int n, boxf* bb, Variable** vs, Constraint*** cs,int transitiveClosure) {
-- Rectangle* rs[n];
-- for(int i=0;i<n;i++) {
-- rs[i]=new Rectangle(bb[i].LL.x,bb[i].UR.x,bb[i].LL.y,bb[i].UR.y);
-- }
-- int m = generateXConstraints(n,rs,vs,*cs,transitiveClosure);
-- for(int i=0;i<n;i++) {
-- delete rs[i];
-- }
-- return m;
--}
--int genYConstraints(int n, boxf* bb, Variable** vs, Constraint*** cs) {
-- Rectangle* rs[n];
-- for(int i=0;i<n;i++) {
-- rs[i]=new Rectangle(bb[i].LL.x,bb[i].UR.x,bb[i].LL.y,bb[i].UR.y);
-- }
-- int m = generateYConstraints(n,rs,vs,*cs);
-- for(int i=0;i<n;i++) {
-- delete rs[i];
-- }
-- return m;
--}
--
--Constraint** newConstraints(int m) {
-- return new Constraint*[m];
--}
--void deleteConstraints(int m, Constraint **cs) {
-- for(int i=0;i<m;i++) {
-- delete cs[i];
-- }
-- delete [] cs;
--}
--void deleteConstraint(Constraint* c) {
-- delete c;
--}
--void deleteVariable(Variable* v) {
-- delete v;
--}
--void satisfyVPSC(Solver* vpsc) {
-- try {
-- vpsc->satisfy();
-- } catch(const char *e) {
-- std::cerr << e << std::endl;
-- exit(1);
-- }
--}
--int getSplitCnt(IncSolver *vpsc) {
-- return vpsc->splitCnt;
--}
--void deleteVPSC(Solver *vpsc) {
-- assert(vpsc!=NULL);
-- delete vpsc;
--}
--void solveVPSC(Solver* vpsc) {
-- vpsc->solve();
--}
--void splitIncVPSC(IncSolver* vpsc) {
-- vpsc->splitBlocks();
--}
--void setVariableDesiredPos(Variable *v, double desiredPos) {
-- v->desiredPosition = desiredPos;
--}
--double getVariablePos(Variable *v) {
-- return v->position();
--}
--void remapInConstraints(Variable *u, Variable *v, double dgap) {
-- for(Constraints::iterator i=u->in.begin();i!=u->in.end();i++) {
-- Constraint* c=*i;
-- c->right=v;
-- c->gap+=dgap;
-- v->in.push_back(c);
-- }
-- u->in.clear();
--}
--void remapOutConstraints(Variable *u, Variable *v, double dgap) {
-- for(Constraints::iterator i=u->out.begin();i!=u->out.end();i++) {
-- Constraint* c=*i;
-- c->left=v;
-- c->gap+=dgap;
-- v->out.push_back(c);
-- }
-- u->out.clear();
--}
--int getLeftVarID(Constraint *c) {
-- return c->left->id;
--}
--int getRightVarID(Constraint *c){
-- return c->right->id;
--}
--double getSeparation(Constraint *c){
-- return c->gap;
--}
--}
-
-=== removed file 'src/libvpsc/csolve_VPSC.h'
---- src/libvpsc/csolve_VPSC.h 2006-07-14 04:09:40 +0000
-+++ src/libvpsc/csolve_VPSC.h 1970-01-01 00:00:00 +0000
-@@ -1,60 +0,0 @@
--/**
-- * \brief Bridge for C programs to access solve_VPSC (which is in C++)
-- *
-- * Authors:
-- * Tim Dwyer <tgdwyer at gmail.com>
-- *
-- * Copyright (C) 2005 Authors
-- *
-- * Released under GNU LGPL. Read the file 'COPYING' for more information.
-- */
--#ifndef _CSOLVE_VPSC_H_
--#define _CSOLVE_VPSC_H_
--#ifdef __cplusplus
--class vpsc::Variable;
--class vpsc::Constraint;
--class vpsc::Solver;
--class vpsc::IncSolver;
--using namespace vpsc;
--extern "C" {
--#else
--typedef struct Variable Variable;
--typedef struct Constraint Constraint;
--typedef struct Solver Solver;
--typedef struct IncSolver IncSolver;
--#endif
--Variable* newVariable(int id, double desiredPos, double weight);
--void setVariableDesiredPos(Variable *, double desiredPos);
--double getVariablePos(Variable*);
--
--Constraint* newConstraint(Variable* left, Variable* right, double gap);
--
--Solver* newSolver(int n, Variable* vs[], int m, Constraint* cs[]);
--void deleteSolver(Solver*);
--void deleteConstraint(Constraint*);
--void deleteVariable(Variable*);
--Constraint** newConstraints(int m);
--void deleteConstraints(int m,Constraint**);
--void remapInConstraints(Variable *u, Variable *v, double dgap);
--void remapOutConstraints(Variable *u, Variable *v, double dgap);
--int getLeftVarID(Constraint *c);
--int getRightVarID(Constraint *c);
--double getSeparation(Constraint *c);
--
--#ifndef HAVE_POINTF_S
--typedef struct pointf_s { double x, y; } pointf;
--typedef struct { pointf LL, UR; } boxf;
--#endif
--int genXConstraints(int n, boxf[], Variable** vs, Constraint*** cs,
-- int transitiveClosure);
--int genYConstraints(int n, boxf[], Variable** vs, Constraint*** cs);
--
--void satisfyVPSC(Solver*);
--void solveVPSC(Solver*);
--Solver* newIncSolver(int n, Variable* vs[], int m, Constraint* cs[]);
--void splitIncSolver(IncSolver*);
--int getSplitCnt(IncSolver *vpsc);
--#ifdef __cplusplus
--}
--#endif
--#endif /* _CSOLVE_VPSC_H_ */
-
-=== modified file 'src/remove-last.h'
---- src/remove-last.h 2007-03-18 18:39:34 +0000
-+++ src/remove-last.h 2013-11-13 21:17:28 +0000
-@@ -12,8 +12,9 @@
-
- typename vector<T>::reverse_iterator i(find(seq.rbegin(), seq.rend(), elem));
- g_assert( i != seq.rend() );
-- typename vector<T>::iterator ii(&*i);
-- seq.erase(ii);
-+ //typename vector<T>::iterator ii(&*i);
-+ //seq.erase(ii);
-+ seq.erase(i.base());
- }
-
-
-
-=== modified file 'src/sp-conn-end.cpp'
---- src/sp-conn-end.cpp 2010-02-21 10:40:13 +0000
-+++ src/sp-conn-end.cpp 2013-11-13 21:17:28 +0000
-@@ -152,7 +152,7 @@
- // Set sensible values incase there the connector ends are not
- // attached to any shapes.
- Geom::PathVector conn_pv = path->curve->get_pathvector();
-- double endPos[2] = { 0, conn_pv[0].size() };
-+ double endPos[2] = { 0, static_cast<double>(conn_pv[0].size()) };
-
- SPConnEnd** _connEnd = path->connEndPair.getConnEnds();
- for (unsigned h = 0; h < 2; ++h) {
-
-=== modified file 'src/sp-guide.cpp'
---- src/sp-guide.cpp 2011-08-21 10:27:43 +0000
-+++ src/sp-guide.cpp 2013-11-13 21:17:28 +0000
-@@ -281,10 +281,10 @@
- Geom::Point B(C[Geom::X], 0);
- Geom::Point D(0, C[Geom::Y]);
-
-- pts.push_back(std::make_pair<Geom::Point, Geom::Point>(A, B));
-- pts.push_back(std::make_pair<Geom::Point, Geom::Point>(B, C));
-- pts.push_back(std::make_pair<Geom::Point, Geom::Point>(C, D));
-- pts.push_back(std::make_pair<Geom::Point, Geom::Point>(D, A));
-+ pts.push_back(std::make_pair(A, B));
-+ pts.push_back(std::make_pair(B, C));
-+ pts.push_back(std::make_pair(C, D));
-+ pts.push_back(std::make_pair(D, A));
-
- sp_guide_pt_pairs_to_guides(dt, pts);
-
-
-=== modified file 'src/sp-item-rm-unsatisfied-cns.cpp'
---- src/sp-item-rm-unsatisfied-cns.cpp 2010-01-09 21:14:38 +0000
-+++ src/sp-item-rm-unsatisfied-cns.cpp 2013-11-13 21:17:28 +0000
-@@ -24,8 +24,8 @@
- if (!approx_equal( sp_guide_distance_from_pt(cn.g, snappoints[snappoint_ix].getPoint()), 0) ) {
- remove_last(cn.g->attached_items, SPGuideAttachment(&item, cn.snappoint_ix));
- g_assert( i < item.constraints.size() );
-- vector<SPGuideConstraint>::iterator const ei(&item.constraints[i]);
-- item.constraints.erase(ei);
-+ // vector<SPGuideConstraint>::iterator const ei(&item.constraints[i]);
-+ // item.constraints.erase(ei);
- }
- }
- }
-
-=== modified file 'src/trace/siox.cpp'
---- src/trace/siox.cpp 2009-01-23 21:55:34 +0000
-+++ src/trace/siox.cpp 2013-11-13 21:17:28 +0000
-@@ -21,6 +21,7 @@
- #include <stdarg.h>
- #include <map>
- #include <algorithm>
-+#include <cstdlib>
-
-
- namespace org
-
-=== modified file 'src/ui/dialog/filedialogimpl-win32.cpp'
---- src/ui/dialog/filedialogimpl-win32.cpp 2012-04-04 19:54:14 +0000
-+++ src/ui/dialog/filedialogimpl-win32.cpp 2013-11-13 21:17:28 +0000
-@@ -16,6 +16,7 @@
- #endif
-
- //General includes
-+#include <cmath>
- #include <list>
- #include <unistd.h>
- #include <sys/stat.h>
-@@ -931,8 +932,9 @@
- const double scaledSvgHeight = scaleFactor * svgHeight;
-
- Geom::Rect area(Geom::Point(0, 0), Geom::Point(scaledSvgWidth, scaledSvgHeight));
-- NRRectL areaL = {0, 0, scaledSvgWidth, scaledSvgHeight};
-- NRRectL bbox = {0, 0, scaledSvgWidth, scaledSvgHeight};
-+ // assume that scaledSvgWidth and scaledSvgHeight are not bigger than largest int
-+ NRRectL areaL = {0, 0, static_cast<int>(trunc(scaledSvgWidth)), static_cast<int>(trunc(scaledSvgHeight))};
-+ NRRectL bbox = {0, 0, static_cast<int>(trunc(scaledSvgWidth)), static_cast<int>(trunc(scaledSvgHeight))};
-
- // write object bbox to area
- Geom::OptRect maybeArea(area);
-
-=== modified file 'src/ui/tool/node.h'
---- src/ui/tool/node.h 2012-01-23 22:51:19 +0000
-+++ src/ui/tool/node.h 2013-11-13 21:17:28 +0000
-@@ -16,7 +16,13 @@
- #include <iosfwd>
- #include <stdexcept>
- #include <cstddef>
-+
-+#if __cplusplus >= 201103L
-+#include <functional>
-+#else
- #include <tr1/functional>
-+#endif
-+
- #include <boost/utility.hpp>
- #include <boost/shared_ptr.hpp>
- #include <boost/optional.hpp>
-@@ -32,11 +38,13 @@
- }
- }
-
-+#if __cplusplus < 201103L
- namespace std {
- namespace tr1 {
- template <typename N> struct hash< Inkscape::UI::NodeIterator<N> >;
- }
- }
-+#endif
-
- namespace Inkscape {
- namespace UI {
-
-=== modified file 'src/widgets/eek-preview.cpp'
---- src/widgets/eek-preview.cpp 2009-03-23 03:16:48 +0000
-+++ src/widgets/eek-preview.cpp 2013-11-13 21:17:28 +0000
-@@ -235,7 +235,7 @@
-
- GdkGC *gc = gdk_gc_new( widget->window );
- EekPreview* preview = EEK_PREVIEW(widget);
-- GdkColor fg = {0, preview->_r, preview->_g, preview->_b};
-+ GdkColor fg = {0, static_cast<guint16>(preview->_r), static_cast<guint16>(preview->_g), static_cast<guint16>(preview->_b)};
-
- gdk_colormap_alloc_color( gdk_colormap_get_system(), &fg, FALSE, TRUE );
-
-
-=== modified file 'src/widgets/sp-color-icc-selector.cpp'
---- src/widgets/sp-color-icc-selector.cpp 2012-02-15 06:02:14 +0000
-+++ src/widgets/sp-color-icc-selector.cpp 2013-11-13 21:17:28 +0000
-@@ -507,9 +507,9 @@
- if ( trans ) {
- guint32 val = _color.toRGBA32(0);
- guchar pre[4] = {
-- SP_RGBA32_R_U(val),
-- SP_RGBA32_G_U(val),
-- SP_RGBA32_B_U(val),
-+ static_cast<guchar>(SP_RGBA32_R_U(val)),
-+ static_cast<guchar>(SP_RGBA32_G_U(val)),
-+ static_cast<guchar>(SP_RGBA32_B_U(val)),
- 255};
- #ifdef DEBUG_LCMS
- g_message("Shoving in [%02x] [%02x] [%02x]", pre[0], pre[1], pre[2]);
-
-=== modified file 'src/xml/repr-io.cpp'
---- src/xml/repr-io.cpp 2012-12-05 22:48:00 +0000
-+++ src/xml/repr-io.cpp 2013-11-13 21:17:28 +0000
-@@ -88,7 +88,9 @@
- }
- }
-
-- int setFile( char const * filename );
-+ int setFile( char const * filename, bool load_entities );
-+
-+ xmlDocPtr readXml();
-
- static int readCb( void * context, char * buffer, int len );
- static int closeCb( void * context );
-@@ -102,12 +104,15 @@
- FILE* fp;
- unsigned char firstFew[4];
- int firstFewLen;
-+ bool LoadEntities; // Checks for SYSTEM Entities (requires cached data)
-+ std::string cachedData;
-+ unsigned int cachedPos;
- Inkscape::URI dummy;
- Inkscape::IO::UriInputStream* instr;
- Inkscape::IO::GzipInputStream* gzin;
- };
-
--int XmlSource::setFile(char const *filename)
-+int XmlSource::setFile(char const *filename, bool load_entities=false)
- {
- int retVal = -1;
-
-@@ -165,17 +170,67 @@
- }
- }
-
-+ if(load_entities) {
-+ this->cachedData = std::string("");
-+ this->cachedPos = 0;
-+
-+ // First get data from file in typical way (cache it all)
-+ char *buffer = new char [4096];
-+ while(true) {
-+ int len = this->read(buffer, 4096);
-+ if(len <= 0) break;
-+ buffer[len] = 0;
-+ this->cachedData += buffer;
-+ }
-+ free(buffer);
-+
-+ // Check for SYSTEM or PUBLIC entities and remove them from the cache
-+ GMatchInfo *info;
-+ gint start, end;
-+
-+ GRegex *regex = g_regex_new(
-+ "<!ENTITY\\s+[^>\\s]+\\s+(SYSTEM|PUBLIC\\s+\"[^>\"]+\")\\s+\"[^>\"]+\"\\s*>",
-+ G_REGEX_CASELESS, G_REGEX_MATCH_NEWLINE_ANY, NULL);
-+
-+ g_regex_match (regex, this->cachedData.c_str(), G_REGEX_MATCH_NEWLINE_ANY, &info);
-+
-+ while (g_match_info_matches (info)) {
-+ if (g_match_info_fetch_pos (info, 1, &start, &end))
-+ this->cachedData.erase(start, end - start);
-+ g_match_info_next (info, NULL);
-+ }
-+ g_match_info_free(info);
-+ g_regex_unref(regex);
-+ }
-+ // Do this after loading cache, so reads don't return cache to fill cache.
-+ this->LoadEntities = load_entities;
- return retVal;
- }
-
-+xmlDocPtr XmlSource::readXml()
-+{
-+ int parse_options = XML_PARSE_HUGE | XML_PARSE_RECOVER;
-+
-+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
-+ bool allowNetAccess = prefs->getBool("/options/externalresources/xml/allow_net_access", false);
-+ if (!allowNetAccess) parse_options |= XML_PARSE_NONET;
-+
-+ // Allow NOENT only if we're filtering out SYSTEM and PUBLIC entities
-+ if (LoadEntities) parse_options |= XML_PARSE_NOENT;
-+
-+ return xmlReadIO( readCb, closeCb, this,
-+ filename, getEncoding(), parse_options);
-+}
-
- int XmlSource::readCb( void * context, char * buffer, int len )
- {
- int retVal = -1;
-+
- if ( context ) {
- XmlSource* self = static_cast<XmlSource*>(context);
- retVal = self->read( buffer, len );
- }
-+
- return retVal;
- }
-
-@@ -193,7 +248,15 @@
- int retVal = 0;
- size_t got = 0;
-
-- if ( firstFewLen > 0 ) {
-+ if ( LoadEntities ) {
-+ if (cachedPos >= cachedData.length()) {
-+ return -1;
-+ } else {
-+ retVal = cachedData.copy(buffer, len, cachedPos);
-+ cachedPos += retVal;
-+ return retVal; // Do NOT continue.
-+ }
-+ } else if ( firstFewLen > 0 ) {
- int some = (len < firstFewLen) ? len : firstFewLen;
- memcpy( buffer, firstFew, some );
- if ( len < firstFewLen ) {
-@@ -289,22 +352,19 @@
- XmlSource src;
-
- if ( (src.setFile(filename) == 0) ) {
-- int parse_options = XML_PARSE_HUGE; // do not use XML_PARSE_NOENT ! see bug lp:1025185
-- Inkscape::Preferences *prefs = Inkscape::Preferences::get();
-- bool allowNetAccess = prefs->getBool("/options/externalresources/xml/allow_net_access", false);
-- if (!allowNetAccess) {
-- parse_options |= XML_PARSE_NONET;
-+ doc = src.readXml();
-+ rdoc = sp_repr_do_read( doc, default_ns );
-+ // For some reason, failed ns loading results in this
-+ // We try a system check version of load with NOENT for adobe
-+ if(rdoc && strcmp(rdoc->root()->name(), "ns:svg") == 0) {
-+ xmlFreeDoc( doc );
-+ src.setFile(filename, true);
-+ doc = src.readXml();
-+ rdoc = sp_repr_do_read( doc, default_ns );
- }
-- doc = xmlReadIO( XmlSource::readCb,
-- XmlSource::closeCb,
-- &src,
-- localFilename,
-- src.getEncoding(),
-- parse_options);
- }
- }
-
-- rdoc = sp_repr_do_read( doc, default_ns );
- if ( doc ) {
- xmlFreeDoc( doc );
- }
-
-=== modified file 'src/extension/effect.cpp'
---- src/extension/effect.cpp 2010-09-28 21:11:41 +0000
-+++ src/extension/effect.cpp 2013-11-19 23:57:37 +0000
-@@ -36,7 +36,7 @@
- Effect::Effect (Inkscape::XML::Node * in_repr, Implementation::Implementation * in_imp)
- : Extension(in_repr, in_imp),
- _id_noprefs(Glib::ustring(get_id()) + ".noprefs"),
-- _name_noprefs(Glib::ustring(get_name()) + _(" (No preferences)")),
-+ _name_noprefs(Glib::ustring(_(get_name())) + _(" (No preferences)")),
- _verb(get_id(), get_name(), NULL, NULL, this, true),
- _verb_nopref(_id_noprefs.c_str(), _name_noprefs.c_str(), NULL, NULL, this, false),
- _menu_node(NULL), _workingDialog(true),
-
-=== modified file 'src/extension/system.cpp'
---- src/extension/system.cpp 2013-09-21 22:20:09 +0000
-+++ src/extension/system.cpp 2013-11-19 23:57:37 +0000
-@@ -20,6 +20,7 @@
-
- #include <interface.h>
-
-+#include <unistd.h>
- #include "system.h"
- #include "preferences.h"
- #include "extension.h"
-
-=== modified file 'src/libnrtype/FontFactory.h'
---- src/libnrtype/FontFactory.h 2010-04-15 19:00:11 +0000
-+++ src/libnrtype/FontFactory.h 2013-12-02 00:55:44 +0000
-@@ -31,7 +31,8 @@
- #include <pango/pangowin32.h>
- #else
- #include <pango/pangoft2.h>
--#include <freetype/freetype.h>
-+#include <ft2build.h>
-+#include FT_FREETYPE_H
- #endif
-
- namespace Glib
-
-=== modified file 'src/sp-polygon.cpp'
---- src/sp-polygon.cpp 2009-08-06 14:17:17 +0000
-+++ src/sp-polygon.cpp 2013-12-06 15:42:17 +0000
-@@ -123,9 +123,12 @@
- }
-
- /* We can safely write points here, because all subclasses require it too (Lauris) */
-- gchar *str = sp_svg_write_polygon(shape->curve->get_pathvector());
-- repr->setAttribute("points", str);
-- g_free(str);
-+ /* While saving polygon element without points attribute _curve is NULL (see bug 1202753) */
-+ if (shape->curve != NULL) {
-+ gchar *str = sp_svg_write_polygon(shape->curve->get_pathvector());
-+ repr->setAttribute("points", str);
-+ g_free(str);
-+ }
-
- if (((SPObjectClass *) (parent_class))->write) {
- ((SPObjectClass *) (parent_class))->write(object, xml_doc, repr, flags);
-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20131211/db2bf7aa/attachment-0001.html>
More information about the macports-changes
mailing list