#include "support/os.h"
#include "support/docstring.h"
+#include "support/FileName.h"
+#include "support/lstrings.h"
+
+#include <limits.h>
+#include <stdlib.h>
#ifdef __APPLE__
#include <Carbon/Carbon.h>
}
+bool isFilesystemCaseSensitive()
+{
+#ifdef __APPLE__
+ return false;
+#else
+ return true;
+#endif
+}
+
+
docstring::size_type common_path(docstring const & p1, docstring const & p2)
{
docstring::size_type i = 0;
}
+bool is_valid_strftime(string const & p)
+{
+ string::size_type pos = p.find_first_of('%');
+ while (pos != string::npos) {
+ if (pos + 1 == string::npos)
+ break;
+ if (!containsOnly(p.substr(pos + 1, 1),
+ "aAbBcCdDeEFgGhHIjklmMnOpPrRsStTuUVwWxXyYzZ%+"))
+ return false;
+ if (pos + 2 == string::npos)
+ break;
+ pos = p.find_first_of('%', pos + 2);
+ }
+ return true;
+}
+
+
char const * popen_read_mode()
{
return "r";
}
+bool is_terminal(io_channel channel)
+{
+ return isatty(channel);
+}
+
+
shell_type shell()
{
return UNIX;
#endif
}
+
+string real_path(string const & path)
+{
+ char rpath[PATH_MAX + 1];
+ char * result = realpath(path.c_str(), rpath);
+ return FileName::fromFilesystemEncoding(result ? rpath : path).absFilename();
+}
+
} // namespace os
} // namespace support
} // namespace lyx