about summary refs log tree commit diff
path: root/src/libutil/util.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-04-12T23·31+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-04-12T23·31+0000
commit0d272fca799f7e6da955875b2935c19542cd6b4d (patch)
treefdaa78a2029bbb06306fa6fe0fcd53a023017357 /src/libutil/util.cc
parentd4f0b0fc6cdb9ae2fd5fc057d621bc80b36a7b18 (diff)
* Remove some obsolete functions.
Diffstat (limited to 'src/libutil/util.cc')
-rw-r--r--src/libutil/util.cc47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index 790c2576802e..d28d0e823c05 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -951,53 +951,6 @@ void _interrupted()
 //////////////////////////////////////////////////////////////////////
 
 
-string packStrings(const Strings & strings)
-{
-    string d;
-    for (Strings::const_iterator i = strings.begin();
-         i != strings.end(); ++i)
-    {
-        unsigned int len = i->size();
-        d += len & 0xff;
-        d += (len >> 8) & 0xff;
-        d += (len >> 16) & 0xff;
-        d += (len >> 24) & 0xff;
-        d += *i;
-    }
-    return d;
-}
-
-    
-Strings unpackStrings(const string & s)
-{
-    Strings strings;
-    
-    string::const_iterator i = s.begin();
-    
-    while (i != s.end()) {
-
-        if (i + 4 > s.end())
-            throw Error(format("short db entry: `%1%'") % s);
-        
-        unsigned int len;
-        len = (unsigned char) *i++;
-        len |= ((unsigned char) *i++) << 8;
-        len |= ((unsigned char) *i++) << 16;
-        len |= ((unsigned char) *i++) << 24;
-
-        if (len == 0xffffffff) return strings; /* explicit end-of-list */
-        
-        if (i + len > s.end())
-            throw Error(format("short db entry: `%1%'") % s);
-
-        strings.push_back(string(i, i + len));
-        i += len;
-    }
-    
-    return strings;
-}
-
-
 Strings tokenizeString(const string & s, const string & separators)
 {
     Strings result;