#include <config.h>
-#include "os.h"
-#include "support/filetools.h"
-#include "support/lstrings.h"
-
+#include "support/os.h"
using std::string;
-namespace {
-
-string binpath_;
-string binname_;
-string tmpdir_;
-
-}
-
namespace lyx {
namespace support {
namespace os {
-void init(int * /*argc*/, char ** argv[])
-{
- static bool initialized = false;
- if (initialized)
- return;
- initialized = true;
-
- string tmp = *argv[0];
- binname_ = OnlyFilename(tmp);
- tmp = ExpandPath(tmp); // This expands ./ and ~/
- if (!is_absolute_path(tmp)) {
- string binsearchpath = GetEnvPath("PATH");
- // This will make "src/lyx" work always :-)
- binsearchpath += ";.";
- tmp = FileOpenSearch(binsearchpath, tmp);
- }
-
- tmp = MakeAbsPath(OnlyPath(tmp));
-
- // In case we are running in place and compiled with shared libraries
- if (suffixIs(tmp, "/.libs/"))
- tmp.erase(tmp.length() - 6, string::npos);
- binpath_ = tmp;
-}
-
-
-void warn(string const & /*mesg*/)
-{
- return;
-}
+void init(int, char *[])
+{}
string current_root()
}
-string slashify_path(string const & p)
-{
- return p;
-}
-
-
string external_path(string const & p)
{
return p;
}
-string binpath()
-{
- return binpath_;
-}
-
-
-string binname()
+string const & nulldev()
{
- return binname_;
+ static string const nulldev_ = "/dev/null";
+ return nulldev_;
}
-void setTmpDir(string const & p)
+shell_type shell()
{
- tmpdir_ = p;
+ return UNIX;
}
-string getTmpDir()
+char path_separator()
{
- return tmpdir_;
+ return ':';
}
-shell_type shell()
-{
- return UNIX;
-}
+void cygwin_path_fix(bool)
+{}
} // namespace os
} // namespace support