diff options
-rw-r--r-- | ept/debtags/coll/TextFormat.cc | 22 | ||||
-rw-r--r-- | ept/debtags/coll/fast.cc | 2 | ||||
-rw-r--r-- | ept/debtags/coll/fast.h | 14 | ||||
-rw-r--r-- | ept/debtags/debtags.cc | 2 |
4 files changed, 3 insertions, 37 deletions
diff --git a/ept/debtags/coll/TextFormat.cc b/ept/debtags/coll/TextFormat.cc index 98c94f8..1592289 100644 --- a/ept/debtags/coll/TextFormat.cc +++ b/ept/debtags/coll/TextFormat.cc @@ -163,28 +163,6 @@ int parseElement(FILE* in, const std::string& pathname, string& item) return EOF; } -static void printTagset(const std::set<string>& ts, FILE* out) -{ - for (std::set<string>::const_iterator i = ts.begin(); - i != ts.end(); i++) - if (i == ts.begin()) - { - if (fprintf(out, "%s", i->c_str()) < 0) - throw wibble::exception::System("writing tagset"); - } - else - { - if (fprintf(out, ", %s", i->c_str()) < 0) - throw wibble::exception::System("writing tagset"); - } -} - -inline static void outString(const std::string& str, FILE* out, const char* what) -{ - if (fwrite(str.data(), str.size(), 1, out) != 1) - throw wibble::exception::System(string("writing ") + what); -} - // item1, item2, item3: tag1, tag2, tag3 diff --git a/ept/debtags/coll/fast.cc b/ept/debtags/coll/fast.cc index 9032bf6..47bbf67 100644 --- a/ept/debtags/coll/fast.cc +++ b/ept/debtags/coll/fast.cc @@ -1,7 +1,7 @@ /* * Fast index for tag data * - * Copyright (C) 2005,2006 Enrico Zini <enrico@debian.org> + * Copyright (C) 2005--2015 Enrico Zini <enrico@debian.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/ept/debtags/coll/fast.h b/ept/debtags/coll/fast.h index 747cefc..6cc34ff 100644 --- a/ept/debtags/coll/fast.h +++ b/ept/debtags/coll/fast.h @@ -6,7 +6,7 @@ */ /* - * Copyright (C) 2005,2006 Enrico Zini <enrico@debian.org> + * Copyright (C) 2005--2015 Enrico Zini <enrico@debian.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -41,14 +41,6 @@ protected: std::map<std::string, std::set<std::string>> items; std::map<std::string, std::set<std::string>> tags; -#if 0 - virtual void consumeItem(const std::string& item, const std::set<std::string>& tags); - virtual void consumeItems(const std::set<std::string>& items, const std::set<std::string>& tags); - - virtual std::set<std::string> getItemsHavingTag(const std::string& tag) const; - virtual std::set<std::string> getTagsOfItem(const std::string& item) const; -#endif - public: typedef std::map<std::string, std::set<std::string>>::const_iterator const_iterator; typedef std::map<std::string, std::set<std::string>>::iterator iterator; @@ -94,10 +86,6 @@ public: unsigned int itemCount() const { return items.size(); } unsigned int tagCount() const { return tags.size(); } -#if 0 - void output(Consumer<std::string, std::string>& consumer) const; -#endif - // tag1 implies tag2 if the itemset of tag1 is a subset of the itemset of // tag2 std::set<std::string> getTagsImplying(const std::string& tag) const; diff --git a/ept/debtags/debtags.cc b/ept/debtags/debtags.cc index 2fde09b..9aed835 100644 --- a/ept/debtags/debtags.cc +++ b/ept/debtags/debtags.cc @@ -6,7 +6,7 @@ /* * System tag database * - * Copyright (C) 2003-2008 Enrico Zini <enrico@debian.org> + * Copyright (C) 2003-2015 Enrico Zini <enrico@debian.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public |