From 6e5fd003e04b81115b6b164b21f048472d575535 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 21 Aug 2014 16:11:05 +0200 Subject: Move `*Version()` functions to version.h/cpp --- src/util.cpp | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'src/util.cpp') diff --git a/src/util.cpp b/src/util.cpp index 606f5a60f..80d27d582 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 @@ -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& 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) -- cgit v1.2.3