]> git.tdb.fi Git - builder.git/blobdiff - source/action.cpp
Use mspio for all I/O operations
[builder.git] / source / action.cpp
index 31b13906acee48a3c493e25efc9e2e7aa9a0f30b..72c14a79ae2ac998496e824a9f05f14afa79cb5f 100644 (file)
@@ -5,19 +5,13 @@ Copyright © 2006-2007, 2009  Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
-#include <iomanip>
-#include <iostream>
-#include <sstream>
+#include <msp/io/print.h>
 #include "action.h"
 
+using namespace Msp;
 using namespace std;
 
 void Action::announce(const string &pkg, const string &tool, const string &tgt)
 {
-       ostringstream line;
-       line<<left;
-       line<<'['<<setw(10)<<pkg.substr(0, 10)<<"] ";
-       line<<'['<<setw(4)<<tool<<"] ";
-       line<<tgt;
-       cout<<line.str()<<'\n';
+       IO::print("[%-10s] [%4s] %s\n", pkg.substr(0, 10), tool, tgt);
 }