]> git.tdb.fi Git - builder.git/blobdiff - source/copy.cpp
Use mspio for all I/O operations
[builder.git] / source / copy.cpp
index 483b9261d9f87af53be9e085ecc7cb6ef474288d..4cb42b707be686f59bd2725f089272f63b4e07d4 100644 (file)
@@ -6,11 +6,11 @@ Distributed under the LGPL
 */
 
 #include <errno.h>
-#include <iostream>
 #include <msp/fs/dir.h>
 #include <msp/fs/stat.h>
 #include <msp/fs/utils.h>
 #include <msp/io/file.h>
+#include <msp/io/print.h>
 #include "builder.h"
 #include "copy.h"
 #include "package.h"
@@ -25,7 +25,7 @@ Copy::Copy(Builder &b, const Package &pkg, const FS::Path &s, const FS::Path &d)
 {
        announce(pkg.get_name(), "COPY", dest[-1]);
        if(builder.get_verbose()>=2)
-               cout<<s<<" -> "<<d<<'\n';
+               IO::print("%s -> %s\n", s, d);
 
        if(!builder.get_dry_run())
                worker=new Worker(*this);
@@ -51,7 +51,7 @@ void Copy::Worker::main()
        {
                if(e.get_error_code()!=ENOENT)
                {
-                       cerr<<e.what()<<'\n';
+                       IO::print(IO::cerr, "%s\n", e.what());
                        done=error=true;
                        return;
                }
@@ -72,7 +72,7 @@ void Copy::Worker::main()
        }
        catch(const Exception &e)
        {
-               cerr<<e.what()<<'\n';
+               IO::print(IO::cerr, "%s\n", e.what());
                done=error=true;
                return;
        }