From f906959a09d58c85d87b445fd1791d91bf278bfa Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Fri, 15 Nov 2013 17:51:29 -0800 Subject: Use new IO classes --- src/monitor/main.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/monitor') diff --git a/src/monitor/main.cpp b/src/monitor/main.cpp index e20e2e3..b398b97 100644 --- a/src/monitor/main.cpp +++ b/src/monitor/main.cpp @@ -14,15 +14,14 @@ #include -#include - #include "../strings/mstring.hpp" #include "../strings/fstring.hpp" #include "../strings/zstring.hpp" #include "../strings/xstring.hpp" +#include "../io/read.hpp" + #include "../common/cxxstdio.hpp" -#include "../common/io.hpp" #include "../common/utils.hpp" #include "../poison.hpp" @@ -79,7 +78,7 @@ void parse_option(XString name, ZString value) static void read_config(ZString filename) { - std::ifstream in(filename.c_str()); + io::ReadFile in(filename); if (!in.is_open()) { FPRINTF(stderr, "Monitor config file not found: %s\n", filename); @@ -87,7 +86,7 @@ void read_config(ZString filename) } FString line; - while (io::getline(in, line)) + while (in.getline(line)) { XString name; ZString value; -- cgit v1.2.3-60-g2f50