]> git.tdb.fi Git - builder.git/blobdiff - source/tar.cpp
Use mspio for all I/O operations
[builder.git] / source / tar.cpp
index 6f7b154feabba71b738c66623080d4d02b68c1a6..75018fb0850b138c93b00d4fad09595f7643490f 100644 (file)
@@ -5,11 +5,11 @@ Copyright © 2007-2009  Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
-#include <iostream>
 #include <cstring>
 #include <msp/fs/stat.h>
 #include <msp/fs/utils.h>
 #include <msp/io/file.h>
+#include <msp/io/print.h>
 #include "builder.h"
 #include "sourcepackage.h"
 #include "tar.h"
@@ -25,7 +25,7 @@ Tar::Tar(Builder &b, const TarBall &t):
        string basename=FS::basename(tarball.get_path());
        announce(tarball.get_package()->get_name(), "TAR ", basename);
        if(builder.get_verbose()>=2)
-               cout<<"Create "<<basename<<'\n';
+               IO::print("Create %s\n", basename);
 
        if(!builder.get_dry_run())
                worker=new Worker(*this);
@@ -57,7 +57,7 @@ void Tar::Worker::main()
                string rel_path=(basedir/relative(ft->get_path(), pkg_src)).str();
                if(rel_path.size()>99)
                {
-                       cout<<"Can't store "<<rel_path<<" in tar archive - too long name\n";
+                       IO::print("Can't store %s in tar archive - too long name\n", rel_path);
                        error=true;
                        break;
                }