* LyX, The Document Processor
*
* Copyright 1995 Matthias Ettrich
- * Copyright 1995-1999 The LyX Team.
+ * Copyright 1995-2000 The LyX Team.
*
* ====================================================== */
#include <fstream>
#include <algorithm>
+
+#include "support/FileInfo.h"
+#include "lastfiles.h"
+#include "debug.h"
+
using std::ifstream;
+using std::getline;
using std::ofstream;
using std::copy;
using std::ostream_iterator;
-
using std::find;
-
-#include "support/FileInfo.h"
-#include "lastfiles.h"
-#include "debug.h"
+using std::endl;
LastFiles::LastFiles(string const & filename, bool st, unsigned int num)
: dostat(st)
{
ofstream ofs(filename.c_str());
if (ofs) {
-#if 0
- for (Files::const_iterator cit = files.begin();
- cit != files.end();
- ++cit) {
- ofs << (*cit) << '\n';
- }
-#else
- // Ok, ok. It is not required to do it this way...but it
- // is kindo nice and shows the versiality of iterators and
- // algorithms. I'll leave this in, and if I get reports
- // about compilations errors I take it out again before
- // 1.1.4. (Lgb)
copy(files.begin(), files.end(),
ostream_iterator<string>(ofs, "\n"));
-#endif
} else
lyxerr << "LyX: Warning: unable to save LastFiles: "
<< filename << endl;