]> git.tdb.fi Git - builder.git/blobdiff - source/copy.cpp
Use mspio for all I/O operations
[builder.git] / source / copy.cpp
index a08085da42d7c09f9014ccd8c71e1fc749e67c5f..4cb42b707be686f59bd2725f089272f63b4e07d4 100644 (file)
@@ -1,16 +1,16 @@
 /* $Id$
 
 This file is part of builder
-Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
+Copyright © 2006-200 Mikko Rasa, Mikkosoft Productions
 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;
        }