guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: nix: Remove unused function.


From: Andy Wingo
Subject: 02/02: nix: Remove unused function.
Date: Fri, 18 Aug 2017 05:53:44 -0400 (EDT)

wingo pushed a commit to branch master
in repository guix.

commit ed464f48efd80e6439441d7a9f6d0e7988fb1272
Author: Andy Wingo <address@hidden>
Date:   Fri Aug 18 11:28:02 2017 +0200

    nix: Remove unused function.
    
    * nix/libutil/util.hh:
    * nix/libutil/util.cc (decodeOctalEscaped): Remove unused and buggy 
function.
---
 nix/libutil/util.cc | 15 ---------------
 nix/libutil/util.hh |  6 ------
 2 files changed, 21 deletions(-)

diff --git a/nix/libutil/util.cc b/nix/libutil/util.cc
index c077544..768e12b 100644
--- a/nix/libutil/util.cc
+++ b/nix/libutil/util.cc
@@ -1106,21 +1106,6 @@ bool endOfList(std::istream & str)
 }
 
 
-string decodeOctalEscaped(const string & s)
-{
-    string r;
-    for (string::const_iterator i = s.begin(); i != s.end(); ) {
-        if (*i != '\\') { r += *i++; continue; }
-        unsigned char c = 0;
-        ++i;
-        while (i != s.end() && *i >= '0' && *i < '8')
-            c = c * 8 + (*i++ - '0');
-        r += c;
-    }
-    return r;
-}
-
-
 void ignoreException()
 {
     try {
diff --git a/nix/libutil/util.hh b/nix/libutil/util.hh
index e84d64d..6a6e07c 100644
--- a/nix/libutil/util.hh
+++ b/nix/libutil/util.hh
@@ -356,12 +356,6 @@ string parseString(std::istream & str);
 bool endOfList(std::istream & str);
 
 
-/* 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();



reply via email to

[Prev in Thread] Current Thread [Next in Thread]