X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flastfiles.C;h=1691253373c4e486f1ec1b79ad81dbbfb15a2ea9;hb=f268743f8c014ef2dadd260fd1a3873cb1d2038b;hp=82365f5eac09923f5139a04b679df4cc6d6ddff0;hpb=9ce32d63e5ff1dbf4c04e3d8263b2649ef3ac595;p=lyx.git diff --git a/src/lastfiles.C b/src/lastfiles.C index 82365f5eac..1691253373 100644 --- a/src/lastfiles.C +++ b/src/lastfiles.C @@ -1,32 +1,35 @@ -/* This file is part of - * ====================================================== - * - * LyX, The Document Processor - * - * Copyright 1995 Matthias Ettrich - * Copyright 1995-1999 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 + + +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; -using std::find; - -#include "support/FileInfo.h" -#include "lastfiles.h" -#include "debug.h" LastFiles::LastFiles(string const & filename, bool st, unsigned int num) : dostat(st) @@ -57,7 +60,7 @@ void LastFiles::readFile(string const & filename) string tmp; FileInfo fileInfo; - while(getline(ifs, tmp) && files.size() < num_files) { + while (getline(ifs, tmp) && files.size() < num_files) { if (dostat) { if (!(fileInfo.newFile(tmp).exist() && fileInfo.isRegular())) @@ -92,7 +95,7 @@ void LastFiles::newFile(string const & file) } -string LastFiles::operator[](unsigned int i) const +string const LastFiles::operator[](unsigned int i) const { if (i < files.size()) return files[i];