[114211] trunk/dports/graphics/inkscape
devans at macports.org
devans at macports.org
Mon Dec 2 10:59:19 PST 2013
Revision: 114211
https://trac.macports.org/changeset/114211
Author: devans at macports.org
Date: 2013-12-02 10:59:19 -0800 (Mon, 02 Dec 2013)
Log Message:
-----------
inkscape: patch through r9988, includes upstream freetype fix, no change in installed files.
Revision Links:
--------------
https://trac.macports.org/changeset/9988
Modified Paths:
--------------
trunk/dports/graphics/inkscape/Portfile
Added Paths:
-----------
trunk/dports/graphics/inkscape/files/patch-r9972-thru-r9988.diff
Removed Paths:
-------------
trunk/dports/graphics/inkscape/files/patch-freetype-2.5.1.diff
trunk/dports/graphics/inkscape/files/patch-r9972-thru-r9985.diff
trunk/dports/graphics/inkscape/files/patch-r9986-thru-r9987.diff
Modified: trunk/dports/graphics/inkscape/Portfile
===================================================================
--- trunk/dports/graphics/inkscape/Portfile 2013-12-02 17:55:09 UTC (rev 114210)
+++ trunk/dports/graphics/inkscape/Portfile 2013-12-02 18:59:19 UTC (rev 114211)
@@ -48,9 +48,7 @@
port:gtkspell2
patchfiles patch-thru-r9971.diff \
- patch-r9972-thru-r9985.diff \
- patch-r9986-thru-r9987.diff \
- patch-freetype-2.5.1.diff \
+ patch-r9972-thru-r9988.diff \
patch-python-configure.ac.diff
variant python26 conflicts python27 description {Configure to use Python version 2.6} {
Deleted: trunk/dports/graphics/inkscape/files/patch-freetype-2.5.1.diff
===================================================================
--- trunk/dports/graphics/inkscape/files/patch-freetype-2.5.1.diff 2013-12-02 17:55:09 UTC (rev 114210)
+++ trunk/dports/graphics/inkscape/files/patch-freetype-2.5.1.diff 2013-12-02 18:59:19 UTC (rev 114211)
@@ -1,15 +0,0 @@
-Fix build with freetype 2.5.1.
-https://bugs.launchpad.net/inkscape/+bug/1255830
---- src/libnrtype/FontFactory.h.orig 2010-04-15 19:00:11 +0000
-+++ src/libnrtype/FontFactory.h 2013-11-28 05:54:34 +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
-
Deleted: trunk/dports/graphics/inkscape/files/patch-r9972-thru-r9985.diff
===================================================================
--- trunk/dports/graphics/inkscape/files/patch-r9972-thru-r9985.diff 2013-12-02 17:55:09 UTC (rev 114210)
+++ trunk/dports/graphics/inkscape/files/patch-r9972-thru-r9985.diff 2013-12-02 18:59:19 UTC (rev 114211)
@@ -1,1670 +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 );
- }
-
Added: trunk/dports/graphics/inkscape/files/patch-r9972-thru-r9988.diff
===================================================================
--- trunk/dports/graphics/inkscape/files/patch-r9972-thru-r9988.diff (rev 0)
+++ trunk/dports/graphics/inkscape/files/patch-r9972-thru-r9988.diff 2013-12-02 18:59:19 UTC (rev 114211)
@@ -0,0 +1,1709 @@
+=== 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
+
Deleted: trunk/dports/graphics/inkscape/files/patch-r9986-thru-r9987.diff
===================================================================
--- trunk/dports/graphics/inkscape/files/patch-r9986-thru-r9987.diff 2013-12-02 17:55:09 UTC (rev 114210)
+++ trunk/dports/graphics/inkscape/files/patch-r9986-thru-r9987.diff 2013-12-02 18:59:19 UTC (rev 114211)
@@ -1,25 +0,0 @@
-=== 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"
-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20131202/6b48d9d4/attachment-0001.html>
More information about the macports-changes
mailing list