]> git.lyx.org Git - lyx.git/blobdiff - src/lastfiles.C
The Gtk patch.
[lyx.git] / src / lastfiles.C
index 82365f5eac09923f5139a04b679df4cc6d6ddff0..1691253373c4e486f1ec1b79ad81dbbfb15a2ea9 100644 (file)
@@ -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 <config.h>
 
+#include "lastfiles.h"
+#include "debug.h"
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
+#include "support/FileInfo.h"
 
 #include <fstream>
 #include <algorithm>
+#include <iterator>
+
+
+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];