summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEduard Braun <eduard.braun2@gmx.de>2018-09-15 12:42:20 +0000
committerEduard Braun <eduard.braun2@gmx.de>2018-09-15 13:06:50 +0000
commit05291f649ed454dc8547d5a7d6de4bbb861f7573 (patch)
tree8a1e129d3c161c4e20b61a2658511c0b592f3ec0 /src
parentSupport reading and writing pipes (diff)
downloadinkscape-05291f649ed454dc8547d5a7d6de4bbb861f7573.tar.gz
inkscape-05291f649ed454dc8547d5a7d6de4bbb861f7573.zip
Fix eaae266840146a0faa3332f253ba7bd63eecbb21
(cherry picked from commit 11504fc9060729939703c380bcaa71cfc36ea351)
Diffstat (limited to 'src')
-rw-r--r--src/io/sys.cpp7
-rw-r--r--src/main.cpp7
2 files changed, 8 insertions, 6 deletions
diff --git a/src/io/sys.cpp b/src/io/sys.cpp
index 21ee94ed3..c56119fb0 100644
--- a/src/io/sys.cpp
+++ b/src/io/sys.cpp
@@ -16,6 +16,11 @@
#endif
#include <fstream>
+#ifdef WIN32
+#include <fcntl.h>
+#include <io.h>
+#endif
+
#include <glib.h>
#include <glib/gstdio.h>
#include <glibmm/ustring.h>
@@ -74,7 +79,7 @@ FILE *Inkscape::IO::fopen_utf8name( char const *utf8name, char const *mode )
Glib::ustring how( mode );
if ( how.find("w") != Glib::ustring::npos ) {
#ifdef WIN32
- setmode(fileno(stdout), O_BINARY)
+ setmode(fileno(stdout), O_BINARY);
#endif
return stdout;
} else {
diff --git a/src/main.cpp b/src/main.cpp
index 3524d61bb..290579a01 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -196,7 +196,7 @@ static void do_query_dimension (SPDocument *doc, bool extent, Geom::Dim2 const a
static void do_query_all (SPDocument *doc);
static void do_query_all_recurse (SPObject *o);
static void do_print_message(const char *message, ...);
-static bool detect_pipe_in_filename(const char *filename);
+static void detect_pipe_in_filename(const char *filename);
static gchar *sp_global_printer = nullptr;
static gchar *sp_export_png = nullptr;
@@ -2250,16 +2250,13 @@ static void do_print_message(const char *message, ...)
* In case it is a pipe the variable sp_writingToPipe is set.
*
* \param filename Filename to check for a pipe.
- * \return true if the filename is a pipe.
*/
-static bool detect_pipe_in_filename(const char *filename)
+static void detect_pipe_in_filename(const char *filename)
{
if (g_strcmp0(filename, "-") == 0) {
sp_writingToPipe = TRUE;
- return true;
}
- return false;
}
/*