]> git.lyx.org Git - lyx.git/blobdiff - src/support/os_unix.cpp
an example for the sweave module, prepared by Gregor Gorjanc
[lyx.git] / src / support / os_unix.cpp
index a9c040c6c9580ea2d366569c67e7b313b12564ad..eb8c1dfa4e3440433002c6ad76538ddd7b4687cd 100644 (file)
@@ -19,7 +19,6 @@
 
 #include <limits.h>
 #include <stdlib.h>
-#include <sys/stat.h>
 
 #ifdef __APPLE__
 #include <Carbon/Carbon.h>
@@ -131,6 +130,12 @@ string const & nulldev()
 }
 
 
+bool is_terminal(io_channel channel)
+{
+       return isatty(channel);
+}
+
+
 shell_type shell()
 {
        return UNIX;
@@ -220,21 +225,6 @@ bool autoOpenFile(string const & filename, auto_open_mode const mode)
 }
 
 
-bool isSameFile(string const & fileone, string const & filetwo)
-{
-       struct stat st1;
-       struct stat st2;
-
-       if (::stat(fileone.c_str(), &st1) == 0
-           && ::stat(filetwo.c_str(), &st2) == 0) {
-               return st1.st_ino == st2.st_ino && st1.st_dev == st2.st_dev;
-       }
-
-       // One or both files cannot be accessed.
-       return false;
-}
-
-
 string real_path(string const & path)
 {
        char rpath[PATH_MAX + 1];