X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flastfiles.C;h=9c5449fb2d94f02fa700ad75fc32068ce1fa1ca1;hb=69cf3b62043861ccad5f8ad7ffb4981fe50b078d;hp=088a1d73e03e44929d857463307ff94a1d34321d;hpb=33a28bdc9cdf978601d5d40b693f13924801ad9e;p=lyx.git diff --git a/src/lastfiles.C b/src/lastfiles.C index 088a1d73e0..9c5449fb2d 100644 --- a/src/lastfiles.C +++ b/src/lastfiles.C @@ -1,8 +1,8 @@ /* This file is part of - * ====================================================== - * + * ====================================================== + * * LyX, The Document Processor - * + * * Copyright 1995 Matthias Ettrich * Copyright 1995-2001 The LyX Team. * @@ -10,20 +10,23 @@ #include +#include "lastfiles.h" +#include "debug.h" -#ifdef __GNUG__ -#pragma implementation -#endif +#include "support/FileInfo.h" #include #include +#include -#include "support/FileInfo.h" -#include "lastfiles.h" -#include "debug.h" +using std::ifstream; +using std::ofstream; using std::getline; using std::endl; +using std::find; +using std::copy; +using std::ostream_iterator; LastFiles::LastFiles(string const & filename, bool st, unsigned int num) @@ -51,7 +54,7 @@ void LastFiles::readFile(string const & filename) { // we will not complain if we can't find filename nor will // we issue a warning. (Lgb) - std::ifstream ifs(filename.c_str()); + ifstream ifs(filename.c_str()); string tmp; FileInfo fileInfo; @@ -68,10 +71,10 @@ void LastFiles::readFile(string const & filename) void LastFiles::writeFile(string const & filename) const { - std::ofstream ofs(filename.c_str()); + ofstream ofs(filename.c_str()); if (ofs) { - std::copy(files.begin(), files.end(), - std::ostream_iterator(ofs, "\n")); + copy(files.begin(), files.end(), + ostream_iterator(ofs, "\n")); } else lyxerr << "LyX: Warning: unable to save LastFiles: " << filename << endl; @@ -81,7 +84,7 @@ void LastFiles::writeFile(string const & filename) const void LastFiles::newFile(string const & file) { // If file already exist, delete it and reinsert at front. - Files::iterator it = std::find(files.begin(), files.end(), file); + Files::iterator it = find(files.begin(), files.end(), file); if (it != files.end()) files.erase(it); files.push_front(file);