diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-09-16 14:58:56 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-09-16 14:58:56 (GMT) |
commit | 6a4071b5d213c52631fe2e73f6f8f51b40ac2e0b (patch) | |
tree | fb460f476d46ccefbe0107a2ccdd50a1d88f6e0d /Source/kwsys/SystemTools.hxx.in | |
parent | d349d6ff18c046df2c9f775a22d28f8e9c10fc7d (diff) | |
download | CMake-6a4071b5d213c52631fe2e73f6f8f51b40ac2e0b.zip CMake-6a4071b5d213c52631fe2e73f6f8f51b40ac2e0b.tar.gz CMake-6a4071b5d213c52631fe2e73f6f8f51b40ac2e0b.tar.bz2 |
ENH: Add method to retrieve the terminal width
Diffstat (limited to 'Source/kwsys/SystemTools.hxx.in')
-rw-r--r-- | Source/kwsys/SystemTools.hxx.in | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/kwsys/SystemTools.hxx.in b/Source/kwsys/SystemTools.hxx.in index 7c6e2ce..02caf2a 100644 --- a/Source/kwsys/SystemTools.hxx.in +++ b/Source/kwsys/SystemTools.hxx.in @@ -276,6 +276,13 @@ public: */ static bool GetLineFromStream(kwsys_ios::istream& istr, kwsys_stl::string& line, bool* has_newline=0); + + /** + * Get the width of the terminal window. The code may or may not work, so + * make sure you have some resonable defaults prepared if the code returns + * some bogus size. + */ + static int GetTerminalWidth(); protected: // these two functions can be called from ConvertToOutputPath |