summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--compat/debug.cpp5
-rw-r--r--compat/debug.hpp3
2 files changed, 8 insertions, 0 deletions
diff --git a/compat/debug.cpp b/compat/debug.cpp
index 2b900180..d7a28289 100644
--- a/compat/debug.cpp
+++ b/compat/debug.cpp
@@ -2,8 +2,10 @@
#include "compat/strerror.hpp"
#include <cerrno>
#include <cstdio>
+#include <iostream>
#include <Corrade/Containers/StringView.h>
+
// Error{} << "error" << colon() << "can't open file" << colon() << quoted("foo") << error_string(EINVAL);
// ===> "error: can't open file 'foo': Invalid argument"
@@ -64,6 +66,9 @@ Debug& operator<<(Debug& dbg, Fraction f)
namespace floormat {
+std::ostream* standard_output() { return &std::cout; }
+std::ostream* standard_error() { return &std::cerr; }
+
using namespace floormat::detail::corrade_debug;
Colon colon(char c) { return Colon{c}; }
diff --git a/compat/debug.hpp b/compat/debug.hpp
index 9fd0f2a9..7d1c6718 100644
--- a/compat/debug.hpp
+++ b/compat/debug.hpp
@@ -57,6 +57,9 @@ Debug& operator<<(Debug& dbg, Fraction frac);
namespace floormat {
+std::ostream* standard_output();
+std::ostream* standard_error();
+
floormat::detail::corrade_debug::Colon colon(char c = ':');
floormat::detail::corrade_debug::ErrorString error_string(int error);
floormat::detail::corrade_debug::ErrorString error_string();