Changeset 8225 for code/branches/kicklib/src/libraries/core/command
- Timestamp:
- Apr 10, 2011, 9:03:59 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/kicklib/src/libraries/core/command/ArgumentCompletionFunctions.cc
r8066 r8225 35 35 36 36 #include <map> 37 #include <boost/version.hpp>38 37 #include <boost/filesystem.hpp> 39 38 … … 47 46 #include "TclThreadManager.h" 48 47 49 // Boost 1.36 has some issues with deprecated functions that have been omitted 50 #if (BOOST_VERSION == 103600) 51 # define BOOST_LEAF_FUNCTION filename 52 # define BOOST_DICTIONARY_ENTRY_NAME string 53 #elif (BOOST_FILESYSTEM_VERSION < 3) 54 # define BOOST_LEAF_FUNCTION leaf 55 # define BOOST_DICTIONARY_ENTRY_NAME string 48 // Differentiate Boost Filesystem v2 and v3 49 #if (BOOST_FILESYSTEM_VERSION < 3) 50 # define BF_LEAF leaf 51 # define BF_GENERIC_STRING string 52 # define BF_DICTIONARY_ENTRY_NAME string 56 53 #else 57 # define BOOST_LEAF_FUNCTION path().filename().string 58 # define BOOST_DICTIONARY_ENTRY_NAME path().string 54 # define BF_LEAF path().filename().string 55 # define BF_GENERIC_STRING generic_string 56 # define BF_DICTIONARY_ENTRY_NAME path().string 59 57 #endif 60 58 … … 250 248 else 251 249 { 252 const std::string& dir = startdirectory. string();250 const std::string& dir = startdirectory.BF_GENERIC_STRING(); 253 251 if (dir.size() > 0 && dir[dir.size() - 1] == ':') 254 252 startdirectory = dir + '/'; … … 262 260 { 263 261 if (boost::filesystem::is_directory(*file)) 264 dirlist.push_back(ArgumentCompletionListElement(file->B OOST_DICTIONARY_ENTRY_NAME() + '/', getLowercase(file->BOOST_DICTIONARY_ENTRY_NAME()) + '/', file->BOOST_LEAF_FUNCTION() + '/'));262 dirlist.push_back(ArgumentCompletionListElement(file->BF_DICTIONARY_ENTRY_NAME() + '/', getLowercase(file->BF_DICTIONARY_ENTRY_NAME()) + '/', file->BF_LEAF() + '/')); 265 263 else 266 filelist.push_back(ArgumentCompletionListElement(file->B OOST_DICTIONARY_ENTRY_NAME(), getLowercase(file->BOOST_DICTIONARY_ENTRY_NAME()), file->BOOST_LEAF_FUNCTION()));264 filelist.push_back(ArgumentCompletionListElement(file->BF_DICTIONARY_ENTRY_NAME(), getLowercase(file->BF_DICTIONARY_ENTRY_NAME()), file->BF_LEAF())); 267 265 ++file; 268 266 }
Note: See TracChangeset
for help on using the changeset viewer.