X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flastfiles.C;h=1691253373c4e486f1ec1b79ad81dbbfb15a2ea9;hb=f268743f8c014ef2dadd260fd1a3873cb1d2038b;hp=088a1d73e03e44929d857463307ff94a1d34321d;hpb=33a28bdc9cdf978601d5d40b693f13924801ad9e;p=lyx.git diff --git a/src/lastfiles.C b/src/lastfiles.C index 088a1d73e0..1691253373 100644 --- a/src/lastfiles.C +++ b/src/lastfiles.C @@ -1,29 +1,34 @@ -/* This file is part of - * ====================================================== - * - * LyX, The Document Processor - * - * Copyright 1995 Matthias Ettrich - * Copyright 1995-2001 The LyX Team. +/** + * \file lastfiles.C + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. * - * ====================================================== */ + * \author Lars Gullik Bjønnes + * + * Full author contact details are available in file CREDITS. + */ #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 namespace lyx::support; + +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 +56,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 +73,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 +86,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);