#include "support/FileName.h"
#include "support/filetools.h"
#include "support/lstrings.h"
+#include "support/TempFile.h"
#include <algorithm>
#include <sstream>
{
// In order to avoid parsing problems with command interpreters
// we pass input data through a file
- FileName const cas_tmpfile = FileName::tempName("casinput");
+ TempFile tempfile("casinput");
+ FileName const cas_tmpfile = tempfile.name();
if (cas_tmpfile.empty()) {
lyxerr << "Warning: cannot create temporary file."
<< endl;
lyxerr << "calling: " << cmd
<< "\ninput: '" << data << "'" << endl;
cmd_ret const ret = runCommand(command);
- cas_tmpfile.removeFile();
return ret.second;
}
istringstream is(out);
string line;
getline(is, line);
- if (line.find("on line") != 0)
+ if (!prefixIs(line, "on line"))
break; // error message not identified
getline(is, line);
size_t pos = line.find('^');