#endif
#include "filetools.h"
+#include "LSubstring.h"
#include "lyx_gui_misc.h"
#include "FileInfo.h"
#include "support/path.h" // I know it's OS/2 specific (SMiyata)
// Substitutes spaces with underscores in filename (and path)
-string SpaceLess(string const & file)
+string MakeLatexName(string const & file)
{
string name = OnlyFilename(file);
string path = OnlyPath(file);
return AddName(path, name);
}
+// Substitutes spaces with underscores in filename (and path)
+string QuoteName(string const & name)
+{
+#ifdef WITH_WARNINGS
+#warning Add proper emx support here!
+#endif
+ string qname = name;
+ while (qname.find("'") != string::npos)
+ LSubstring(qname,"'") = "\\'";
+ return '\'' + qname + '\'';
+}
+
/// Returns an unique name to be used as a temporary file.
string TmpFileName(string const & dir, string const & mask)