From db1d45037cf923bf470a8581d5546bef8247c756 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 25 Aug 2017 15:57:49 +0200 Subject: Handle SIGWINCH --- src/libutil/util.hh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/libutil/util.hh') diff --git a/src/libutil/util.hh b/src/libutil/util.hh index 7340ca6c7478..30e3c0df1c1a 100644 --- a/src/libutil/util.hh +++ b/src/libutil/util.hh @@ -349,6 +349,12 @@ bool hasSuffix(const string & s, const string & suffix); std::string toLower(const std::string & s); +/* Escape a string that contains octal-encoded escape codes such as + used in /etc/fstab and /proc/mounts (e.g. "foo\040bar" decodes to + "foo bar"). */ +string decodeOctalEscaped(const string & s); + + /* Exception handling in destructors: print an error message, then ignore the exception. */ void ignoreException(); @@ -470,4 +476,8 @@ struct MaintainCount }; +/* Return the number of rows and columns of the terminal. */ +std::pair getWindowSize(); + + } -- cgit 1.4.1