]> git.tdb.fi Git - libs/gui.git/commitdiff
Use mspio rather than iostreams for printing errors
authorMikko Rasa <tdb@tdb.fi>
Wed, 5 Jun 2013 07:01:46 +0000 (10:01 +0300)
committerMikko Rasa <tdb@tdb.fi>
Wed, 5 Jun 2013 07:01:46 +0000 (10:01 +0300)
source/graphics/x11/display.cpp

index 0e89794f458205fc74a82dde078c027bf1aaef4a..b68f9bd2283aa8c71c93561ed5a768a8330c069a 100644 (file)
@@ -3,6 +3,7 @@
 #ifdef WITH_XF86VIDMODE
 #include <X11/extensions/xf86vmode.h>
 #endif
+#include <msp/io/print.h>
 #include <msp/strings/format.h>
 #include <msp/strings/lexicalcast.h>
 #include "display.h"
@@ -26,10 +27,10 @@ int x_error_handler(Display *display, XErrorEvent *event)
 
        string msg = Msp::format("Request %s failed with %s [%08X]", req, err, event->resourceid);
        if(error_flag)
-               cerr<<"Discarding error: "<<msg<<'\n';
+               Msp::IO::print(Msp::IO::cerr, "Discarding error: %s\n", msg);
        else
        {
-               cerr<<msg<<'\n';
+               Msp::IO::print(Msp::IO::cerr, "%s\n", msg);
                error_msg = msg;
                error_flag = true;
        }