diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-05-11 18:05:52 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-05-11 18:05:52 +0000 |
commit | 01746745f1287effa1772ef51b973988afcea699 (patch) | |
tree | a0b36215c048f45698f1ecbef044953e0f3e37cc /include/llvm/System/Process.h | |
parent | 5c8274b5e3034c1cfae02426c68f353abfbf506f (diff) | |
download | external_llvm-01746745f1287effa1772ef51b973988afcea699.tar.gz external_llvm-01746745f1287effa1772ef51b973988afcea699.tar.bz2 external_llvm-01746745f1287effa1772ef51b973988afcea699.zip |
Add terminal width detection to llvm::sys::Process. This is needed to
fix Clang PRs 4148 and 4183.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71448 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/System/Process.h')
-rw-r--r-- | include/llvm/System/Process.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/llvm/System/Process.h b/include/llvm/System/Process.h index f98a3612c6..ce19eb2981 100644 --- a/include/llvm/System/Process.h +++ b/include/llvm/System/Process.h @@ -94,6 +94,19 @@ namespace sys { /// the user rather than being put on a pipe or stored in a file. static bool StandardErrIsDisplayed(); + /// This function determines the number of columns in the window + /// if standard output is connected to a "tty" or "console" + /// window. If standard output is not connected to a tty or + /// console, or if the number of columns cannot be determined, + /// this routine returns zero. + static unsigned StandardOutColumns(); + + /// This function determines the number of columns in the window + /// if standard error is connected to a "tty" or "console" + /// window. If standard error is not connected to a tty or + /// console, or if the number of columns cannot be determined, + /// this routine returns zero. + static unsigned StandardErrColumns(); /// @} }; } |