diff options
Diffstat (limited to 'src/libutil/util.hh')
-rw-r--r-- | src/libutil/util.hh | 10 |
1 files changed, 10 insertions, 0 deletions
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<unsigned short, unsigned short> getWindowSize(); + + } |