]> git.tdb.fi Git - builder.git/blobdiff - source/action.cpp
Use mspio for all I/O operations
[builder.git] / source / action.cpp
index ebd6b422ba3770c69cc2fec9f99017dfa5cb6a99..72c14a79ae2ac998496e824a9f05f14afa79cb5f 100644 (file)
@@ -1,26 +1,17 @@
 /* $Id$
 
 This file is part of builder
-Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
+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;
 
-/**
-Annouces the action by printing out the package name, tool and target name.
-*/
 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);
 }