]> 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 ccc04b69e2a26609573dedf8e3c790c7a16be0f4..eb8c1dfa4e3440433002c6ad76538ddd7b4687cd 100644 (file)
@@ -30,23 +30,8 @@ namespace lyx {
 namespace support {
 namespace os {
 
-namespace {
-
-string stdoutdev_ = "/dev/stdout";
-string stderrdev_ = "/dev/stderr";
-
-} // namespace anon
-
 void init(int, char *[])
-{
-       // Check whether /dev/stdout and /dev/stderr are available,
-       // otherwise default to /dev/tty.
-       if (access(stdoutdev_.c_str(), W_OK) != 0
-           || access(stderrdev_.c_str(), W_OK) != 0) {
-               stdoutdev_ = "/dev/tty";
-               stderrdev_ = "/dev/tty";
-       }
-}
+{}
 
 
 string current_root()
@@ -145,21 +130,9 @@ string const & nulldev()
 }
 
 
-string const & stdoutdev()
-{
-       return stdoutdev_;
-}
-
-
-string const & stderrdev()
-{
-       return stderrdev_;
-}
-
-
-bool terminal_output()
+bool is_terminal(io_channel channel)
 {
-       return isatty(1) && isatty(2);
+       return isatty(channel);
 }