]> git.lyx.org Git - lyx.git/blobdiff - src/lastfiles.C
fix typo that put too many include paths for most people
[lyx.git] / src / lastfiles.C
index 5076e40a7f78259442de1dada48bad9be011a995..615b9de7ee35c8e52338e9dd516aca4369f6526d 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
- * ====================================================== 
- * 
+ * ======================================================
+ *
  *           LyX, The Document Processor
- *      
+ *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-2001 The LyX Team.
  *
 #pragma implementation
 #endif
 
+#include "lastfiles.h"
+#include "debug.h"
+
+#include "support/FileInfo.h"
+
 #include <fstream>
 #include <algorithm>
+#include <iterator>
 
-#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,11 +59,11 @@ 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;
 
-       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()))
@@ -68,10 +76,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<string>(ofs, "\n"));
+               copy(files.begin(), files.end(),
+                    ostream_iterator<string>(ofs, "\n"));
        } else
                lyxerr << "LyX: Warning: unable to save LastFiles: "
                       << filename << endl;
@@ -81,7 +89,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);