]> git.lyx.org Git - lyx.git/blobdiff - src/support/os_unix.C
the convert patch
[lyx.git] / src / support / os_unix.C
index 1d13cd50861e4700bf102e1e819e35a9be269dd9..28235773133e77f33720950e0d7e651b420f485f 100644 (file)
 #include <config.h>
 
 #include "support/os.h"
-#include "support/filetools.h"
-#include "support/lstrings.h"
-
 
 using std::string;
 
 
-namespace {
-
-string binpath_;
-string binname_;
-string tmpdir_;
-string homepath_;
-string nulldev_;
-
-}
-
 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;
-
-       tmpdir_ = "/tmp";
-       homepath_ = GetEnvPath("HOME");
-       nulldev_ = "/dev/null";
-}
-
-
-void warn(string const & /*mesg*/)
-{
-       return;
-}
+void init(int, char *[])
+{}
 
 
 string current_root()
@@ -96,12 +51,6 @@ string::size_type common_path(string const & p1, string const & p2)
 }
 
 
-string slashify_path(string const & p)
-{
-       return p;
-}
-
-
 string external_path(string const & p)
 {
        return p;
@@ -126,46 +75,27 @@ char const * popen_read_mode()
 }
 
 
-string const & binpath()
-{
-       return binpath_;
-}
-
-
-string const & binname()
-{
-       return binname_;
-}
-
-
-void setTmpDir(string const & p)
-{
-       tmpdir_ = p;
-}
-
-
-string const & getTmpDir()
+string const & nulldev()
 {
-       return tmpdir_;
+       static string const nulldev_ = "/dev/null";
+       return nulldev_;
 }
 
 
-string const & homepath()
+shell_type shell()
 {
-       return homepath_;
+       return UNIX;
 }
 
 
-string const & nulldev()
+char path_separator()
 {
-       return nulldev_;
+       return ':';
 }
 
 
-shell_type shell()
-{
-       return UNIX;
-}
+void cygwin_path_fix(bool)
+{}
 
 } // namespace os
 } // namespace support