CLoggerConsole::message(Level l, const std::string& msg)
{
const char* ls[] = { "Error", "Warning", "Info", "Debug" };
- cerr << "*** " << ls[l] << ": " << msg << endl;
+ std::cerr << "*** " << ls[l] << ": " << msg << std::endl;
}
assert(res);
//cout << "*** THE TEX DOCUMENT" << endl;
//style.save(doc.document(), stdout);
- cout << "*** THE CURRENT DOCUMENT:" << endl;
+ std::cout << "*** THE CURRENT DOCUMENT:" << std::endl;
if (result) style.save(result, stdout);
- cout << "*** THE NEW DOCUMENT:" << endl;
+ std::cout << "*** THE NEW DOCUMENT:" << std::endl;
style.save(res, stdout);
- cout << "*** THE DIFF:" << endl;
+ std::cout << "*** THE DIFF:" << std::endl;
DOMX::Diff diff = DOMX::Diff::diff(result, res);
style.save(diff.document(), stdout);
diff.patch();
if (elem.hasAttribute("count"))
{
unsigned count;
- istringstream is(elem.getAttribute("count"));
+ std::istringstream is(elem.getAttribute("count"));
is >> count;
assert(count == 1);
}
unsigned count = 1;
if (p2.hasAttribute("count"))
{
- istringstream is(p2.getAttribute("count"));
+ std::istringstream is(p2.getAttribute("count"));
is >> count;
}
while (count-- > 0)
unsigned count = 1;
if (p2.hasAttribute("count"))
{
- istringstream is(p2.getAttribute("count"));
+ std::istringstream is(p2.getAttribute("count"));
is >> count;
}
while (count-- > 0)
*/
#include <string>
+#include <cctype>
#include "ALogger.hh"
#include "TToken.hh"
#include <string>
#include <vector>
+#if defined(HAVE_EXT_HASH_MAP)
+#include <ext/hash_map>
+#elif defined(HAVE_HASH_MAP)
#include <hash_map>
+#else
+#error "no hash_map could be found"
+#endif
#include <list>
#include "dom.hh"
std::string complete(const std::string, std::list<std::string>&) const;
private:
+#if defined(HAVE_EXT_HASH_MAP)
+ struct StringHash : public std::unary_function< std::string, size_t >
+ { size_t operator()(const std::string& s) const { return __gnu_cxx::hash<char*>()(s.c_str()); } };
+#elif defined(HAVE_HASH_MAP)
struct StringHash : public std::unary_function< std::string, size_t >
{ size_t operator()(const std::string& s) const { return hash<char*>()(s.c_str()); } };
+#else
+#error "no hash_map could be found"
+#endif
#if 0
struct StringEq : public std::binary_function< std::string, std::string, bool >
std::string
TDocument::makeId(unsigned id)
{
- ostringstream os;
+ std::ostringstream os;
os << "I" << id;
return os.str();
}
*/
#include <string>
+#include <cctype>
#include "TToken.hh"
#include "TPushLexer.hh"