summaryrefslogtreecommitdiffstats
path: root/src/io/inkscapestream.cpp
diff options
context:
space:
mode:
authorMarkus Engel <markus.engel@tum.de>2013-03-29 23:52:42 +0000
committerMarkus Engel <markus.engel@tum.de>2013-03-29 23:52:42 +0000
commita168040d5a452544328a1e6ad35aaac351f94d44 (patch)
treefae1ba829f543a473da281bd5fa6e4deabbf6912 /src/io/inkscapestream.cpp
parentRemoved function pointers from SPObject and subclasses. (diff)
parentDutch translation update (diff)
downloadinkscape-a168040d5a452544328a1e6ad35aaac351f94d44.tar.gz
inkscape-a168040d5a452544328a1e6ad35aaac351f94d44.zip
merged from trunk
(bzr r11608.1.56)
Diffstat (limited to 'src/io/inkscapestream.cpp')
-rw-r--r--src/io/inkscapestream.cpp52
1 files changed, 6 insertions, 46 deletions
diff --git a/src/io/inkscapestream.cpp b/src/io/inkscapestream.cpp
index da7870add..dcfc662ca 100644
--- a/src/io/inkscapestream.cpp
+++ b/src/io/inkscapestream.cpp
@@ -11,7 +11,7 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-
+#include <cstdlib>
#include "inkscapestream.h"
namespace Inkscape
@@ -125,11 +125,12 @@ void BasicOutputStream::flush()
/**
* Writes the specified byte to this output stream.
*/
-void BasicOutputStream::put(int ch)
+int BasicOutputStream::put(gunichar ch)
{
if (closed)
- return;
+ return -1;
destination.put(ch);
+ return 1;
}
@@ -137,8 +138,6 @@ void BasicOutputStream::put(int ch)
//#########################################################################
//# B A S I C R E A D E R
//#########################################################################
-
-
/**
*
*/
@@ -183,10 +182,6 @@ gunichar BasicReader::get()
}
-
-
-
-
/**
* Reads a line of data from the reader.
*/
@@ -255,13 +250,6 @@ static bool getDouble(Glib::ustring &str, double *val)
-
-
-
-
-/**
- *
- */
const Reader &BasicReader::readBool (bool& val )
{
Glib::ustring buf = readWord();
@@ -272,9 +260,6 @@ const Reader &BasicReader::readBool (bool& val )
return *this;
}
-/**
- *
- */
const Reader &BasicReader::readShort (short& val )
{
Glib::ustring buf = readWord();
@@ -284,9 +269,6 @@ const Reader &BasicReader::readShort (short& val )
return *this;
}
-/**
- *
- */
const Reader &BasicReader::readUnsignedShort (unsigned short& val )
{
Glib::ustring buf = readWord();
@@ -296,9 +278,6 @@ const Reader &BasicReader::readUnsignedShort (unsigned short& val )
return *this;
}
-/**
- *
- */
const Reader &BasicReader::readInt (int& val )
{
Glib::ustring buf = readWord();
@@ -308,9 +287,6 @@ const Reader &BasicReader::readInt (int& val )
return *this;
}
-/**
- *
- */
const Reader &BasicReader::readUnsignedInt (unsigned int& val )
{
Glib::ustring buf = readWord();
@@ -320,9 +296,6 @@ const Reader &BasicReader::readUnsignedInt (unsigned int& val )
return *this;
}
-/**
- *
- */
const Reader &BasicReader::readLong (long& val )
{
Glib::ustring buf = readWord();
@@ -332,9 +305,6 @@ const Reader &BasicReader::readLong (long& val )
return *this;
}
-/**
- *
- */
const Reader &BasicReader::readUnsignedLong (unsigned long& val )
{
Glib::ustring buf = readWord();
@@ -344,9 +314,6 @@ const Reader &BasicReader::readUnsignedLong (unsigned long& val )
return *this;
}
-/**
- *
- */
const Reader &BasicReader::readFloat (float& val )
{
Glib::ustring buf = readWord();
@@ -356,9 +323,6 @@ const Reader &BasicReader::readFloat (float& val )
return *this;
}
-/**
- *
- */
const Reader &BasicReader::readDouble (double& val )
{
Glib::ustring buf = readWord();
@@ -775,9 +739,7 @@ void OutputStreamWriter::flush()
*/
void OutputStreamWriter::put(gunichar ch)
{
- //Do we need conversions here?
- int intCh = (int) ch;
- outputStream.put(intCh);
+ outputStream.put(ch);
}
//#########################################################################
@@ -827,9 +789,7 @@ void StdWriter::flush()
*/
void StdWriter::put(gunichar ch)
{
- //Do we need conversions here?
- int intCh = (int) ch;
- outputStream->put(intCh);
+ outputStream->put(ch);
}