]> git.lyx.org Git - features.git/blobdiff - src/support/os.h
Allow to separately redirect stdout and stderr.
[features.git] / src / support / os.h
index b5d1fecd80afc22b38c128702124a61dbcdef49f..1644ef4bf001eac42a13bae957aa28999736e720 100644 (file)
@@ -27,6 +27,12 @@ enum shell_type {
        CMD_EXE
 };
 
+enum io_channel {
+       STDIN = 0,
+       STDOUT,
+       STDERR
+};
+
 /// Do some work just once.
 void init(int argc, char * argv[]);
 
@@ -39,9 +45,8 @@ std::string const & stdoutdev();
 /// Returns the name of the stderr device (/dev/stderr, /dev/tty, conout$).
 std::string const & stderrdev();
 
-/// Tells whether LyX is being run from a terminal and stdout/stderr are
-/// not redirected.
-bool terminal_output();
+/// Tells whether \p channel is connected to a terminal or not. 
+bool is_terminal(io_channel channel);
 
 /// Returns "/" on *nix, "C:/", etc on Windows.
 std::string current_root();