[Debtags-commits] [svn] r1694 - in tagcoll/2.0: . tagcoll tests
Enrico Zini
enrico at costa.debian.org
Tue May 2 23:22:11 UTC 2006
Author: enrico
Date: Tue May 2 23:22:02 2006
New Revision: 1694
Removed:
tagcoll/2.0/tagcoll/stringf.cc
tagcoll/2.0/tagcoll/stringf.h
Modified:
tagcoll/2.0/ (props changed)
tagcoll/2.0/tagcoll/CardinalityStore.cc
tagcoll/2.0/tagcoll/MMapIndex.cc
tagcoll/2.0/tagcoll/Makefile.am
tagcoll/2.0/tagcoll/ParserBase.cc
tagcoll/2.0/tagcoll/Patches.cc
tagcoll/2.0/tagcoll/SmartHierarchy.cc
tagcoll/2.0/tagcoll/TextFormat.tcc
tagcoll/2.0/tests/test-utils.h
Log:
r2558 at viaza: enrico | 2006-05-03 00:45:18 +0200
Finally got rid of stringf!
Modified: tagcoll/2.0/tagcoll/CardinalityStore.cc
==============================================================================
--- tagcoll/2.0/tagcoll/CardinalityStore.cc (original)
+++ tagcoll/2.0/tagcoll/CardinalityStore.cc Tue May 2 23:22:02 2006
@@ -20,7 +20,6 @@
#include <tagcoll/CardinalityStore.h>
#include <tagcoll/Patches.h>
-#include <tagcoll/stringf.h>
#include <iterator>
#include <algorithm>
@@ -32,7 +31,6 @@
#ifdef TRACE
#include <cstdio>
-#include "stringf.h"
#endif
using namespace std;
Modified: tagcoll/2.0/tagcoll/MMapIndex.cc
==============================================================================
--- tagcoll/2.0/tagcoll/MMapIndex.cc (original)
+++ tagcoll/2.0/tagcoll/MMapIndex.cc Tue May 2 23:22:02 2006
@@ -20,7 +20,6 @@
#include <wibble/exception.h>
#include <tagcoll/MMapIndex.h>
-#include <tagcoll/stringf.h>
#include <stdlib.h>
#include <stdio.h>
@@ -35,7 +34,6 @@
using namespace std;
using namespace wibble;
using namespace tagcoll;
-using namespace stringf;
MasterMMapIndex::MasterMMapIndex() : m_fd(-1), m_buf(0) {}
Modified: tagcoll/2.0/tagcoll/Makefile.am
==============================================================================
--- tagcoll/2.0/tagcoll/Makefile.am (original)
+++ tagcoll/2.0/tagcoll/Makefile.am Tue May 2 23:22:02 2006
@@ -6,7 +6,6 @@
# Include the .cc files that contain template definitions
tagcollinclude_HEADERS = \
- stringf.h \
setutils.h \
ParserBase.h \
MemParserInput.h \
@@ -55,7 +54,6 @@
lib_LTLIBRARIES = libtagcoll.la
libtagcoll_la_SOURCES = \
- stringf.cc \
ParserBase.cc \
MemParserInput.cc \
StringParserInput.cc \
Modified: tagcoll/2.0/tagcoll/ParserBase.cc
==============================================================================
--- tagcoll/2.0/tagcoll/ParserBase.cc (original)
+++ tagcoll/2.0/tagcoll/ParserBase.cc Tue May 2 23:22:02 2006
@@ -19,27 +19,30 @@
*/
#include <tagcoll/ParserBase.h>
-#include <tagcoll/stringf.h>
#include <string>
+#include <sstream>
using namespace std;
-using namespace stringf;
namespace tagcoll {
namespace exception {
std::string Parser::makeContext(const std::string& file, int line)
{
+ stringstream res;
+
if (file.size() > 0)
if (line != -1)
- return "Parsing " + file + ":" + fmt(line);
+ res << "Parsing " << file << ":" << line;
else
- return "Parsing " + file;
+ res << "Parsing " << file;
else
if (_line != -1)
- return "Parsing line " + fmt(_line);
+ res << "Parsing line " << _line;
else
- return "Parsing data";
+ res << "Parsing data";
+
+ return res.str();
}
Parser::Parser(const tagcoll::ParserInput& input, const std::string& message) throw ()
Modified: tagcoll/2.0/tagcoll/Patches.cc
==============================================================================
--- tagcoll/2.0/tagcoll/Patches.cc (original)
+++ tagcoll/2.0/tagcoll/Patches.cc Tue May 2 23:22:02 2006
@@ -22,8 +22,6 @@
#include <stdio.h>
-#include <tagcoll/stringf.h>
-
using namespace std;
using namespace wibble::operators;
Modified: tagcoll/2.0/tagcoll/SmartHierarchy.cc
==============================================================================
--- tagcoll/2.0/tagcoll/SmartHierarchy.cc (original)
+++ tagcoll/2.0/tagcoll/SmartHierarchy.cc Tue May 2 23:22:02 2006
@@ -26,8 +26,6 @@
#if VERB1 || VERB_FLATTEN
#include <stdio.h>
-#include "../common/stringf.h"
-//using namespace stringf;
static void print_spaces(int n) throw ()
{
@@ -115,12 +113,12 @@
for (std::set<TAG>::const_iterator i = processed.begin();
i != processed.end(); i++)
if (i == processed.begin())
- fprintf(stderr, "%.*s", PFSTR(*i));
+ fprintf(stderr, "%s", i->c_str());
else
- fprintf(stderr, ", %.*s", PFSTR(*i));
+ fprintf(stderr, ", %s", i->c_str());
fprintf(stderr, "\n");
//print_spaces(nest);
- fprintf(stderr, " Chosen %.*s[%d]\n", PFSTR(tag), card);
+ fprintf(stderr, " Chosen %s[%d]\n", tag.c_str(), card);
#endif
// Append the child node
Modified: tagcoll/2.0/tagcoll/TextFormat.tcc
==============================================================================
--- tagcoll/2.0/tagcoll/TextFormat.tcc (original)
+++ tagcoll/2.0/tagcoll/TextFormat.tcc Tue May 2 23:22:02 2006
@@ -20,7 +20,6 @@
#include <tagcoll/TextFormat.h>
#include <tagcoll/Patches.h>
-#include <tagcoll/stringf.h>
#include <wibble/exception.h>
#include <wibble/empty.h>
@@ -37,12 +36,12 @@
i != ts.end(); i++)
if (i == ts.begin())
{
- if (fprintf(out, "%.*s", PFSTR(*i)) < 0)
+ if (fprintf(out, "%s", i->c_str()) < 0)
throw wibble::exception::System("writing tagset");
}
else
{
- if (fprintf(out, ", %.*s", PFSTR(*i)) < 0)
+ if (fprintf(out, ", %s", i->c_str()) < 0)
throw wibble::exception::System("writing tagset");
}
}
@@ -154,7 +153,7 @@
i != patch.end(); i++)
{
string sitem = itemconv(i->first);
- if (fprintf(out, "%.*s: ", PFSTR(sitem)) < 0)
+ if (fprintf(out, "%s: ", sitem.c_str()) < 0)
throw wibble::exception::System("writing item");
std::set<string> stags;
Modified: tagcoll/2.0/tests/test-utils.h
==============================================================================
--- tagcoll/2.0/tests/test-utils.h (original)
+++ tagcoll/2.0/tests/test-utils.h Tue May 2 23:22:02 2006
@@ -6,7 +6,6 @@
#include <tut.h>
#include <string>
-#include <tagcoll/stringf.h>
#define TEST_TAGCOLL
@@ -32,7 +31,6 @@
namespace tut_tagcoll {
using namespace std;
-using namespace stringf;
using namespace tagcoll;
using namespace tut;
More information about the Debtags-commits
mailing list