summaryrefslogtreecommitdiff
path: root/nix/libutil
diff options
context:
space:
mode:
authorAndy Wingo <wingo@igalia.com>2017-08-18 11:28:02 +0200
committerAndy Wingo <wingo@igalia.com>2017-08-18 11:31:28 +0200
commited464f48efd80e6439441d7a9f6d0e7988fb1272 (patch)
tree1464385bca764cad4414f90605c35cffcc458562 /nix/libutil
parent842e0e439a22081be1b4fed7ddc21d6d228afd10 (diff)
nix: Remove unused function.
* nix/libutil/util.hh: * nix/libutil/util.cc (decodeOctalEscaped): Remove unused and buggy function.
Diffstat (limited to 'nix/libutil')
-rw-r--r--nix/libutil/util.cc15
-rw-r--r--nix/libutil/util.hh6
2 files changed, 0 insertions, 21 deletions
diff --git a/nix/libutil/util.cc b/nix/libutil/util.cc
index c07754487e0..768e12b5e45 100644
--- a/nix/libutil/util.cc
+++ b/nix/libutil/util.cc
@@ -1106,21 +1106,6 @@ bool endOfList(std::istream & str)
1106} 1106}
1107 1107
1108 1108
1109string decodeOctalEscaped(const string & s)
1110{
1111 string r;
1112 for (string::const_iterator i = s.begin(); i != s.end(); ) {
1113 if (*i != '\\') { r += *i++; continue; }
1114 unsigned char c = 0;
1115 ++i;
1116 while (i != s.end() && *i >= '0' && *i < '8')
1117 c = c * 8 + (*i++ - '0');
1118 r += c;
1119 }
1120 return r;
1121}
1122
1123
1124void ignoreException() 1109void ignoreException()
1125{ 1110{
1126 try { 1111 try {
diff --git a/nix/libutil/util.hh b/nix/libutil/util.hh
index e84d64d10af..6a6e07c4785 100644
--- a/nix/libutil/util.hh
+++ b/nix/libutil/util.hh
@@ -356,12 +356,6 @@ string parseString(std::istream & str);
356bool endOfList(std::istream & str); 356bool endOfList(std::istream & str);
357 357
358 358
359/* Escape a string that contains octal-encoded escape codes such as
360 used in /etc/fstab and /proc/mounts (e.g. "foo\040bar" decodes to
361 "foo bar"). */
362string decodeOctalEscaped(const string & s);
363
364
365/* Exception handling in destructors: print an error message, then 359/* Exception handling in destructors: print an error message, then
366 ignore the exception. */ 360 ignore the exception. */
367void ignoreException(); 361void ignoreException();