summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.0.2-PATCHES/ChangeLog8
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.0.2-PATCHES/patch-01-path54
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.0.2-PATCHES/patch-02-namespace30
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.0.2-PATCHES/patch-03-esc26
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.0.2/src/GraphicPath.h6
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.0.2/src/InputBuffer.h6
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.0.2/src/PsSpecialHandler.h5
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-1.0.2/src/Terminal.cpp8
8 files changed, 131 insertions, 12 deletions
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.0.2-PATCHES/ChangeLog b/Build/source/texk/dvisvgm/dvisvgm-1.0.2-PATCHES/ChangeLog
index b0cfa0c1c48..06a2b63855d 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.0.2-PATCHES/ChangeLog
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.0.2-PATCHES/ChangeLog
@@ -1,3 +1,11 @@
+2010-07-05 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Portability patches from Martin Gieseking.
+
+ Added patch-01-path, mail from Thu, 24 Jun 2010 09:16:04.
+ Added patch-02-namespace, mail from Thu, 24 Jun 2010 15:49:05.
+ Added patch-03-esc, mail from Thu, 24 Jun 2010 22:41:57.
+
2010-06-23 Peter Breitenlohner <peb@mppmu.mpg.de>
Imported release 1.0.2.
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.0.2-PATCHES/patch-01-path b/Build/source/texk/dvisvgm/dvisvgm-1.0.2-PATCHES/patch-01-path
new file mode 100644
index 00000000000..de62a54225f
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.0.2-PATCHES/patch-01-path
@@ -0,0 +1,54 @@
+diff -ur dvisvgm-1.0.2.orig/src/GraphicPath.h dvisvgm-1.0.2/src/GraphicPath.h
+--- dvisvgm-1.0.2.orig/src/GraphicPath.h 2010-06-16 19:09:47.000000000 +0200
++++ dvisvgm-1.0.2/src/GraphicPath.h 2010-07-05 10:38:09.963061244 +0200
+@@ -247,7 +247,7 @@
+ * @param[in] optimize if true, shorthand drawing commands (sconicto, scubicto,...) are considered */
+ template <typename T>
+ void GraphicPath<T>::iterate (Actions &actions, bool optimize) const {
+- ConstIterator prev; // pointer to preceding command
++ ConstIterator prev = _commands.end(); // pointer to preceding command
+ Point fp; // first point of current path
+ Point cp; // current point
+ Point pstore[2];
+@@ -280,7 +280,7 @@
+ }
+ break;
+ case Command::CONICTO:
+- if (optimize && prev->type == Command::CONICTO && params[0] == pstore[1]*T(2)-pstore[0]) {
++ if (optimize && prev != _commands.end() && prev->type == Command::CONICTO && params[0] == pstore[1]*T(2)-pstore[0]) {
+ actions.sconicto(params[1]);
+ actions.draw('T', params+1, 1);
+ }
+@@ -293,7 +293,7 @@
+ break;
+ case Command::CUBICTO:
+ // is first control point reflection of preceding second control point?
+- if (optimize && prev->type == Command::CUBICTO && params[0] == pstore[1]*T(2)-pstore[0]) {
++ if (optimize && prev != _commands.end() && prev->type == Command::CUBICTO && params[0] == pstore[1]*T(2)-pstore[0]) {
+ actions.scubicto(params[1], params[2]);
+ actions.draw('S', params+1, 2);
+ }
+diff -ur dvisvgm-1.0.2.orig/src/PsSpecialHandler.h dvisvgm-1.0.2/src/PsSpecialHandler.h
+--- dvisvgm-1.0.2.orig/src/PsSpecialHandler.h 2010-06-17 19:07:35.000000000 +0200
++++ dvisvgm-1.0.2/src/PsSpecialHandler.h 2010-07-05 10:38:09.963061244 +0200
+@@ -31,9 +31,10 @@
+
+ class PsSpecialHandler : public SpecialHandler, protected PSActions
+ {
++ typedef GraphicPath<double> Path;
++
+ class ClippingStack
+ {
+- typedef GraphicPath<double> Path;
+ public:
+ void push ();
+ void push (const Path &path);
+@@ -100,7 +101,7 @@
+ SpecialActions *_actions;
+ bool _initialized;
+ XMLElementNode *_xmlnode; ///< if != 0, created SVG elements are appended to this node
+- GraphicPath<double> _path;
++ Path _path;
+ DPair _currentpoint; ///< current PS position
+ double _linewidth; ///< current linewidth
+ double _miterlimit; ///< current miter limit
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.0.2-PATCHES/patch-02-namespace b/Build/source/texk/dvisvgm/dvisvgm-1.0.2-PATCHES/patch-02-namespace
new file mode 100644
index 00000000000..ed4a24d2bb7
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.0.2-PATCHES/patch-02-namespace
@@ -0,0 +1,30 @@
+diff -ur dvisvgm-1.0.2.orig/src/InputBuffer.h dvisvgm-1.0.2/src/InputBuffer.h
+--- dvisvgm-1.0.2.orig/src/InputBuffer.h 2010-06-16 19:08:12.000000000 +0200
++++ dvisvgm-1.0.2/src/InputBuffer.h 2010-07-05 10:39:29.396407278 +0200
+@@ -4,7 +4,7 @@
+ ** This file is part of dvisvgm -- the DVI to SVG converter **
+ ** Copyright (C) 2005-2010 Martin Gieseking <martin.gieseking@uos.de> **
+ ** **
+-** This program is free software; you can redistribute it and/or **
++** This program is free software; you can redistribute it and/or **
+ ** modify it under the terms of the GNU General Public License as **
+ ** published by the Free Software Foundation; either version 3 of **
+ ** the License, or (at your option) any later version. **
+@@ -15,7 +15,7 @@
+ ** GNU General Public License for more details. **
+ ** **
+ ** You should have received a copy of the GNU General Public License **
+-** along with this program; if not, see <http://www.gnu.org/licenses/>. **
++** along with this program; if not, see <http://www.gnu.org/licenses/>. **
+ *************************************************************************/
+
+ #ifndef INPUTBUFFER_H
+@@ -101,7 +101,7 @@
+ _size = size;
+ }
+
+- void assign (const char *buf) {assign(buf, strlen(buf));}
++ void assign (const char *buf) {assign(buf, std::strlen(buf));}
+ int peek () const {return _size > 0 ? *_pos : -1;}
+ int peek (unsigned n) const {return _size >= n ? _pos[n] : -1;}
+ bool eof () const {return _size <= 0;}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.0.2-PATCHES/patch-03-esc b/Build/source/texk/dvisvgm/dvisvgm-1.0.2-PATCHES/patch-03-esc
new file mode 100644
index 00000000000..68969261935
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.0.2-PATCHES/patch-03-esc
@@ -0,0 +1,26 @@
+diff -ur dvisvgm-1.0.2.orig/src/Terminal.cpp dvisvgm-1.0.2/src/Terminal.cpp
+--- dvisvgm-1.0.2.orig/src/Terminal.cpp 2010-06-08 10:40:37.000000000 +0200
++++ dvisvgm-1.0.2/src/Terminal.cpp 2010-07-05 10:40:35.135954475 +0200
+@@ -134,9 +134,9 @@
+ }
+ #else
+ if (color == DEFAULT)
+- os << "\e[0m";
++ os << "\x1B[0m";
+ else
+- os << "\e[" << (light ? '1': '0') << ';' << (30+(color & 0x07)) << 'm';
++ os << "\x1B[" << (light ? '1': '0') << ';' << (30+(color & 0x07)) << 'm';
+ #endif
+ }
+
+@@ -158,8 +158,8 @@
+ }
+ #else
+ if (color == DEFAULT)
+- os << "\e[0m";
++ os << "\x1B[0m";
+ else
+- os << "\e[" << (40+(color & 0x07)) << 'm';
++ os << "\x1B[" << (40+(color & 0x07)) << 'm';
+ #endif
+ }
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.0.2/src/GraphicPath.h b/Build/source/texk/dvisvgm/dvisvgm-1.0.2/src/GraphicPath.h
index f2c70e97b02..132c4d357b6 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.0.2/src/GraphicPath.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.0.2/src/GraphicPath.h
@@ -247,7 +247,7 @@ class GraphicPath
* @param[in] optimize if true, shorthand drawing commands (sconicto, scubicto,...) are considered */
template <typename T>
void GraphicPath<T>::iterate (Actions &actions, bool optimize) const {
- ConstIterator prev; // pointer to preceding command
+ ConstIterator prev = _commands.end(); // pointer to preceding command
Point fp; // first point of current path
Point cp; // current point
Point pstore[2];
@@ -280,7 +280,7 @@ void GraphicPath<T>::iterate (Actions &actions, bool optimize) const {
}
break;
case Command::CONICTO:
- if (optimize && prev->type == Command::CONICTO && params[0] == pstore[1]*T(2)-pstore[0]) {
+ if (optimize && prev != _commands.end() && prev->type == Command::CONICTO && params[0] == pstore[1]*T(2)-pstore[0]) {
actions.sconicto(params[1]);
actions.draw('T', params+1, 1);
}
@@ -293,7 +293,7 @@ void GraphicPath<T>::iterate (Actions &actions, bool optimize) const {
break;
case Command::CUBICTO:
// is first control point reflection of preceding second control point?
- if (optimize && prev->type == Command::CUBICTO && params[0] == pstore[1]*T(2)-pstore[0]) {
+ if (optimize && prev != _commands.end() && prev->type == Command::CUBICTO && params[0] == pstore[1]*T(2)-pstore[0]) {
actions.scubicto(params[1], params[2]);
actions.draw('S', params+1, 2);
}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.0.2/src/InputBuffer.h b/Build/source/texk/dvisvgm/dvisvgm-1.0.2/src/InputBuffer.h
index 72caff31f8d..21cb79d0a49 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.0.2/src/InputBuffer.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.0.2/src/InputBuffer.h
@@ -4,7 +4,7 @@
** This file is part of dvisvgm -- the DVI to SVG converter **
** Copyright (C) 2005-2010 Martin Gieseking <martin.gieseking@uos.de> **
** **
-** This program is free software; you can redistribute it and/or **
+** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
** published by the Free Software Foundation; either version 3 of **
** the License, or (at your option) any later version. **
@@ -15,7 +15,7 @@
** GNU General Public License for more details. **
** **
** You should have received a copy of the GNU General Public License **
-** along with this program; if not, see <http://www.gnu.org/licenses/>. **
+** along with this program; if not, see <http://www.gnu.org/licenses/>. **
*************************************************************************/
#ifndef INPUTBUFFER_H
@@ -101,7 +101,7 @@ class CharInputBuffer : public InputBuffer
_size = size;
}
- void assign (const char *buf) {assign(buf, strlen(buf));}
+ void assign (const char *buf) {assign(buf, std::strlen(buf));}
int peek () const {return _size > 0 ? *_pos : -1;}
int peek (unsigned n) const {return _size >= n ? _pos[n] : -1;}
bool eof () const {return _size <= 0;}
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.0.2/src/PsSpecialHandler.h b/Build/source/texk/dvisvgm/dvisvgm-1.0.2/src/PsSpecialHandler.h
index 85d84e16b2d..51b24816095 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.0.2/src/PsSpecialHandler.h
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.0.2/src/PsSpecialHandler.h
@@ -31,9 +31,10 @@ class XMLElementNode;
class PsSpecialHandler : public SpecialHandler, protected PSActions
{
+ typedef GraphicPath<double> Path;
+
class ClippingStack
{
- typedef GraphicPath<double> Path;
public:
void push ();
void push (const Path &path);
@@ -100,7 +101,7 @@ class PsSpecialHandler : public SpecialHandler, protected PSActions
SpecialActions *_actions;
bool _initialized;
XMLElementNode *_xmlnode; ///< if != 0, created SVG elements are appended to this node
- GraphicPath<double> _path;
+ Path _path;
DPair _currentpoint; ///< current PS position
double _linewidth; ///< current linewidth
double _miterlimit; ///< current miter limit
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.0.2/src/Terminal.cpp b/Build/source/texk/dvisvgm/dvisvgm-1.0.2/src/Terminal.cpp
index 17037ce68fe..fbab8fd3761 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-1.0.2/src/Terminal.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-1.0.2/src/Terminal.cpp
@@ -134,9 +134,9 @@ void Terminal::color (int color, bool light, ostream &os) {
}
#else
if (color == DEFAULT)
- os << "\e[0m";
+ os << "\x1B[0m";
else
- os << "\e[" << (light ? '1': '0') << ';' << (30+(color & 0x07)) << 'm';
+ os << "\x1B[" << (light ? '1': '0') << ';' << (30+(color & 0x07)) << 'm';
#endif
}
@@ -158,8 +158,8 @@ void Terminal::bgcolor (int color, bool light, ostream &os) {
}
#else
if (color == DEFAULT)
- os << "\e[0m";
+ os << "\x1B[0m";
else
- os << "\e[" << (40+(color & 0x07)) << 'm';
+ os << "\x1B[" << (40+(color & 0x07)) << 'm';
#endif
}