]> matita.cs.unibo.it Git - helm.git/commitdiff
C++ 3.2 aware changes
authorStefano Zacchiroli <zack@upsilon.cc>
Wed, 2 Apr 2003 09:14:10 +0000 (09:14 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Wed, 2 Apr 2003 09:14:10 +0000 (09:14 +0000)
helm/DEVEL/mathml_editor/src/CLoggerConsole.cc
helm/DEVEL/mathml_editor/src/CMathMLFactoryXSLTDiff.cc
helm/DEVEL/mathml_editor/src/Diff.cc
helm/DEVEL/mathml_editor/src/LPushLexer.cc
helm/DEVEL/mathml_editor/src/TDictionary.hh
helm/DEVEL/mathml_editor/src/TDocument.cc
helm/DEVEL/mathml_editor/src/TPushLexer.cc

index f5d4749def82a2581825a4d26a46f12b5272248b..0265f389daa4d0be4bfdf2ed1c25e410cd6b216a 100644 (file)
@@ -31,5 +31,5 @@ void
 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;
 }
index 91f32e5399ed65064aa9e0a47e61c88fc3b0f5ef..d3706a70427f307db334196c9c9593ef2f59d614 100644 (file)
@@ -52,11 +52,11 @@ CMathMLFactoryXSLTDiff::documentModified(TDocument& doc)
   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();
index 294797195740482b29b7a9a6722c4f42d1a9bc8b..6c226babdf6ee40defcad41915ae993b37857fbe 100644 (file)
@@ -291,7 +291,7 @@ namespace GdomeSmartDOMExt
        if (elem.hasAttribute("count"))
          {
            unsigned count;
-           istringstream is(elem.getAttribute("count"));
+           std::istringstream is(elem.getAttribute("count"));
            is >> count;
            assert(count == 1);
          }
@@ -331,7 +331,7 @@ namespace GdomeSmartDOMExt
            unsigned count = 1;
            if (p2.hasAttribute("count"))
              {
-               istringstream is(p2.getAttribute("count"));
+               std::istringstream is(p2.getAttribute("count"));
                is >> count;
              }
            while (count-- > 0)
@@ -365,7 +365,7 @@ namespace GdomeSmartDOMExt
            unsigned count = 1;
            if (p2.hasAttribute("count"))
              {
-               istringstream is(p2.getAttribute("count"));
+               std::istringstream is(p2.getAttribute("count"));
                is >> count;
              }
            while (count-- > 0)
index 74cda410aa5abc77738684c2304fb9a8762f6f14..8a22d6678bad9c13ae1c7cda52b2c73d18adfb3b 100644 (file)
@@ -24,6 +24,7 @@
  */
 
 #include <string>
+#include <cctype>
 
 #include "ALogger.hh"
 #include "TToken.hh"
index 8807f83772e0e2076a86079b9d1ca12875ea25bc..4864630f969cf0c36bb117a7a5855300aead6de2 100644 (file)
 
 #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"
@@ -93,8 +99,15 @@ public:
   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 >
index 5f5a07e4b6d0a382f54800a14cc82523519524b2..322a08d7f84bfd25d0fa6005d57de7338b5e46a9 100644 (file)
@@ -70,7 +70,7 @@ TDocument::serialize(const char* filename) const
 std::string
 TDocument::makeId(unsigned id)
 {
-  ostringstream os;
+  std::ostringstream os;
   os << "I" << id;
   return os.str();
 }
index f9dc184c261795ef24632841f8c55be4f2d1decc..ee884cfe991c6a980e02a85c6dbdddb19c5d64c2 100644 (file)
@@ -24,6 +24,7 @@
  */
 
 #include <string>
+#include <cctype>
 
 #include "TToken.hh"
 #include "TPushLexer.hh"