diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-01 17:40:13 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-01 17:40:13 +0000 |
commit | 836f134c56bfa714217ca12a73482205c1480774 (patch) | |
tree | 5c5b9d938a712e09831bdd32022e1b3716c5fbdf /chrome/tools/convert_dict/aff_reader.cc | |
parent | d46d6f3b80099ce0c630185a2e86b649bba49254 (diff) | |
download | chromium_src-836f134c56bfa714217ca12a73482205c1480774.zip chromium_src-836f134c56bfa714217ca12a73482205c1480774.tar.gz chromium_src-836f134c56bfa714217ca12a73482205c1480774.tar.bz2 |
Cross-platform wrappers for fopen, _wfopen_s, etc.
Patch by Paweł Hajdan jr <phajdan.jr@gmail.com>.
http://codereview.chromium.org/6005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2760 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/tools/convert_dict/aff_reader.cc')
-rw-r--r-- | chrome/tools/convert_dict/aff_reader.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/tools/convert_dict/aff_reader.cc b/chrome/tools/convert_dict/aff_reader.cc index bc04cde..06ec131 100644 --- a/chrome/tools/convert_dict/aff_reader.cc +++ b/chrome/tools/convert_dict/aff_reader.cc @@ -6,6 +6,7 @@ #include <algorithm> +#include "base/file_util.h" #include "base/string_util.h" #include "chrome/tools/convert_dict/hunspell_reader.h" @@ -44,7 +45,7 @@ void CollapseDuplicateSpaces(std::string* str) { } // namespace AffReader::AffReader(const std::string& filename) { - fopen_s(&file_, filename.c_str(), "r"); + file_ = file_util::OpenFile(filename, "r"); // Default to Latin1 in case the file doesn't specify it. encoding_ = "ISO8859-1"; @@ -52,7 +53,7 @@ AffReader::AffReader(const std::string& filename) { AffReader::~AffReader() { if (file_) - fclose(file_); + file_util::CloseFile(file_); } bool AffReader::Read() { |