Patch boost to fix Boost-1.33.1 interoperability problem
g0dil [Tue, 23 Jun 2009 14:17:13 +0000 (14:17 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1235 270642c3-0616-0410-b53a-bc976706d245

Utils/Console/LineEditor.cc
boost/multi_index/composite_key.hpp

index 512ab6f..00faa8b 100644 (file)
@@ -146,7 +146,7 @@ completePath(term::LineEditor & editor, unsigned & b, unsigned & e, std::string
 {
     std::string const & t (editor.text());
     // Search backward from e finding the longest valid path. This does *not* accept all valid
-    // path's, only those without empedded white-space. However, this is only for completion so
+    // path's, only those without embedded white-space. However, this is only for completion so
     // it's ok. 
     if (b<e) {
         unsigned bb (e-1);
@@ -182,21 +182,20 @@ completePath(term::LineEditor & editor, unsigned & b, unsigned & e, std::string
     ParseCommandInfo::TokensRange::const_iterator i (path.begin());
     ParseCommandInfo::TokensRange::const_iterator const i_end (boost::prior(path.end()));
     DirectoryNode * dir (& client().cwd());
-    std::string basePath;
     for (; i != i_end; ++i)
         if (*i == NoneToken()) {
             if (i == path.begin()) {
                 dir = & client().root();
-                basePath = "/";
+                prefix = "/";
             }
         }
         else if (*i == WordToken("..")) {
             DirectoryNode * parent (dir->parent().get());
             if (parent) dir = parent;
-            basePath += "../";
+            prefix += "../";
         }
         else if (*i == WordToken(".")) 
-            basePath += "./";
+            prefix += "./";
         else {
             if (dir->hasChild(i->value())) {
                 try {
@@ -205,7 +204,7 @@ completePath(term::LineEditor & editor, unsigned & b, unsigned & e, std::string
                 catch (std::bad_cast &) {
                     return;
                 }
-                basePath += i->value() + "/";
+                prefix += i->value() + "/";
             } 
             else {
                 DirectoryNode::ChildrenRange cs (dir->completions(i->value()));
@@ -214,7 +213,7 @@ completePath(term::LineEditor & editor, unsigned & b, unsigned & e, std::string
                     if (!node.isDirectory())
                         return;
                     dir = static_cast<DirectoryNode*>(&node);
-                    basePath += cs.begin()->first + "/";
+                    prefix += cs.begin()->first + "/";
                 }
                 else
                     return;
@@ -222,7 +221,6 @@ completePath(term::LineEditor & editor, unsigned & b, unsigned & e, std::string
         }
 
     DirectoryNode::ChildrenRange cs (dir->completions(i->value()));
-    prefix = basePath;
     for (DirectoryNode::ChildrenRange::iterator j (cs.begin()); j != cs.end(); ++j)
         completions.push_back(j->first + (j->second->followLink().isDirectory() ? "/" : " "));
 }
index 12e0605..d388f64 100644 (file)
@@ -14,7 +14,7 @@
 #endif
 
 #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <boost/functional/hash_fwd.hpp>
+#include <boost/functional/hash.hpp>
 #include <boost/multi_index/detail/access_specifier.hpp>
 #include <boost/multi_index/detail/prevent_eti.hpp>
 #include <boost/mpl/eval_if.hpp>