]> git.lyx.org Git - lyx.git/blobdiff - src/support/os_unix.C
tostr -> convert and some bformat work
[lyx.git] / src / support / os_unix.C
index 758ac1bfde0a350344ee5c582a93eb34ebf68717..53594714e35622b369963910b150cf1b78d6f448 100644 (file)
@@ -25,6 +25,8 @@ namespace {
 string binpath_;
 string binname_;
 string tmpdir_;
+string homepath_;
+string nulldev_;
 
 }
 
@@ -55,6 +57,10 @@ void init(int /*argc*/, char * argv[])
        if (suffixIs(tmp, "/.libs/"))
                tmp.erase(tmp.length() - 6, string::npos);
        binpath_ = tmp;
+
+       tmpdir_ = "/tmp";
+       homepath_ = GetEnvPath("HOME");
+       nulldev_ = "/dev/null";
 }
 
 
@@ -90,12 +96,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;
@@ -120,13 +120,13 @@ char const * popen_read_mode()
 }
 
 
-string binpath()
+string const & binpath()
 {
        return binpath_;
 }
 
 
-string binname()
+string const & binname()
 {
        return binname_;
 }
@@ -138,12 +138,24 @@ void setTmpDir(string const & p)
 }
 
 
-string getTmpDir()
+string const & getTmpDir()
 {
        return tmpdir_;
 }
 
 
+string const & homepath()
+{
+       return homepath_;
+}
+
+
+string const & nulldev()
+{
+       return nulldev_;
+}
+
+
 shell_type shell()
 {
        return UNIX;