]> git.tdb.fi Git - builder.git/blobdiff - source/builder.cpp
Converted from iostreams to mspio
[builder.git] / source / builder.cpp
index caf7fe54eb10bf4a618c750f0235fc61936ed425..21e7dcdf629c4a97780059c5d1615cb12dca60b2 100644 (file)
@@ -5,12 +5,13 @@ Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
-#include <fstream>
 #include <iostream>
 #include <set>
 #include <msp/core/except.h>
 #include <msp/core/getopt.h>
 #include <msp/datafile/parser.h>
+#include <msp/io/buffered.h>
+#include <msp/io/file.h>
 #include <msp/path/utils.h>
 #include <msp/strings/formatter.h>
 #include <msp/strings/regex.h>
@@ -472,9 +473,8 @@ Loads the given build file.
 */
 int Builder::load_build_file(const Path &fn)
 {
-       ifstream in(fn.str().c_str());
-       if(!in)
-               return -1;
+       IO::File inf(fn.str());
+       IO::Buffered in(inf);
 
        if(verbose>=3)
                cout<<"Reading "<<fn<<'\n';