diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-08-21 16:11:05 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-08-26 13:25:21 +0200 |
commit | 6e5fd003e04b81115b6b164b21f048472d575535 (patch) | |
tree | 7420ebadf22b1b10bebd08ad3294abc7e8a9b565 /src/util.cpp | |
parent | b4aa769bcb82519024ee54fc84a37c34420d53b8 (diff) |
Move `*Version()` functions to version.h/cpp
Diffstat (limited to 'src/util.cpp')
-rw-r--r-- | src/util.cpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/util.cpp b/src/util.cpp index 606f5a60f9..80d27d5826 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -13,7 +13,6 @@ #include "random.h" #include "sync.h" #include "uint256.h" -#include "version.h" #include <stdarg.h> @@ -1116,30 +1115,6 @@ void SetMockTime(int64_t nMockTimeIn) nMockTime = nMockTimeIn; } -string FormatVersion(int nVersion) -{ - if (nVersion%100 == 0) - return strprintf("%d.%d.%d", nVersion/1000000, (nVersion/10000)%100, (nVersion/100)%100); - else - return strprintf("%d.%d.%d.%d", nVersion/1000000, (nVersion/10000)%100, (nVersion/100)%100, nVersion%100); -} - -string FormatFullVersion() -{ - return CLIENT_BUILD; -} - -// Format the subversion field according to BIP 14 spec (https://en.bitcoin.it/wiki/BIP_0014) -std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments) -{ - std::ostringstream ss; - ss << "/"; - ss << name << ":" << FormatVersion(nClientVersion); - if (!comments.empty()) - ss << "(" << boost::algorithm::join(comments, "; ") << ")"; - ss << "/"; - return ss.str(); -} #ifdef WIN32 boost::filesystem::path GetSpecialFolderPath(int nFolder, bool fCreate) |