Skip to content

Commit

Permalink
scripted-diff: Move util files to separate directory.
Browse files Browse the repository at this point in the history
-BEGIN VERIFY SCRIPT-
mkdir -p src/util
git mv src/util.h src/util/system.h
git mv src/util.cpp src/util/system.cpp
git mv src/utilmemory.h src/util/memory.h
git mv src/utilmoneystr.h src/util/moneystr.h
git mv src/utilmoneystr.cpp src/util/moneystr.cpp
git mv src/utilstrencodings.h src/util/strencodings.h
git mv src/utilstrencodings.cpp src/util/strencodings.cpp
git mv src/utiltime.h src/util/time.h
git mv src/utiltime.cpp src/util/time.cpp

sed -i 's/<util\.h>/<util\/system\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp')
sed -i 's/<utilmemory\.h>/<util\/memory\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp')
sed -i 's/<utilmoneystr\.h>/<util\/moneystr\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp')
sed -i 's/<utilstrencodings\.h>/<util\/strencodings\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp')
sed -i 's/<utiltime\.h>/<util\/time\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp')

sed -i 's/BITCOIN_UTIL_H/BITCOIN_UTIL_SYSTEM_H/g' src/util/system.h
sed -i 's/BITCOIN_UTILMEMORY_H/BITCOIN_UTIL_MEMORY_H/g' src/util/memory.h
sed -i 's/BITCOIN_UTILMONEYSTR_H/BITCOIN_UTIL_MONEYSTR_H/g' src/util/moneystr.h
sed -i 's/BITCOIN_UTILSTRENCODINGS_H/BITCOIN_UTIL_STRENCODINGS_H/g' src/util/strencodings.h
sed -i 's/BITCOIN_UTILTIME_H/BITCOIN_UTIL_TIME_H/g' src/util/time.h

sed -i 's/ util\.\(h\|cpp\)/ util\/system\.\1/g' src/Makefile.am
sed -i 's/utilmemory\.\(h\|cpp\)/util\/memory\.\1/g' src/Makefile.am
sed -i 's/utilmoneystr\.\(h\|cpp\)/util\/moneystr\.\1/g' src/Makefile.am
sed -i 's/utilstrencodings\.\(h\|cpp\)/util\/strencodings\.\1/g' src/Makefile.am
sed -i 's/utiltime\.\(h\|cpp\)/util\/time\.\1/g' src/Makefile.am

sed -i 's/-> util ->/-> util\/system ->/' test/lint/lint-circular-dependencies.sh
sed -i 's/src\/util\.cpp/src\/util\/system\.cpp/g' test/lint/lint-format-strings.py test/lint/lint-locale-dependence.sh
sed -i 's/src\/utilmoneystr\.cpp/src\/util\/moneystr\.cpp/g' test/lint/lint-locale-dependence.sh
sed -i 's/src\/utilstrencodings\.\(h\|cpp\)/src\/util\/strencodings\.\1/g' test/lint/lint-locale-dependence.sh
sed -i 's/src\\utilstrencodings\.cpp/src\\util\\strencodings\.cpp/' build_msvc/libbitcoinconsensus/libbitcoinconsensus.vcxproj
-END VERIFY SCRIPT-
  • Loading branch information
jimpo committed Nov 5, 2018
1 parent 742ee21 commit 2068f08
Show file tree
Hide file tree
Showing 152 changed files with 239 additions and 239 deletions.
2 changes: 1 addition & 1 deletion build_msvc/libbitcoinconsensus/libbitcoinconsensus.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<ClCompile Include="..\..\src\script\script.cpp" />
<ClCompile Include="..\..\src\script\script_error.cpp" />
<ClCompile Include="..\..\src\uint256.cpp" />
<ClCompile Include="..\..\src\utilstrencodings.cpp" />
<ClCompile Include="..\..\src\util\strencodings.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
Expand Down
20 changes: 10 additions & 10 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@ BITCOIN_CORE_H = \
txmempool.h \
ui_interface.h \
undo.h \
util.h \
utilmemory.h \
utilmoneystr.h \
utiltime.h \
util/system.h \
util/memory.h \
util/moneystr.h \
util/time.h \
validation.h \
validationinterface.h \
versionbits.h \
Expand Down Expand Up @@ -377,8 +377,8 @@ libbitcoin_consensus_a_SOURCES = \
tinyformat.h \
uint256.cpp \
uint256.h \
utilstrencodings.cpp \
utilstrencodings.h \
util/strencodings.cpp \
util/strencodings.h \
version.h

# common: shared between bitcoind, and bitcoin-qt and non-server tools
Expand Down Expand Up @@ -427,10 +427,10 @@ libbitcoin_util_a_SOURCES = \
support/cleanse.cpp \
sync.cpp \
threadinterrupt.cpp \
util.cpp \
utilmoneystr.cpp \
utilstrencodings.cpp \
utiltime.cpp \
util/system.cpp \
util/moneystr.cpp \
util/strencodings.cpp \
util/time.cpp \
$(BITCOIN_CORE_H)

if GLIBC_BACK_COMPAT
Expand Down
2 changes: 1 addition & 1 deletion src/addrdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <random.h>
#include <streams.h>
#include <tinyformat.h>
#include <util.h>
#include <util/system.h>

namespace {

Expand Down
2 changes: 1 addition & 1 deletion src/addrman.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <random.h>
#include <sync.h>
#include <timedata.h>
#include <util.h>
#include <util/system.h>

#include <map>
#include <set>
Expand Down
2 changes: 1 addition & 1 deletion src/arith_uint256.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <arith_uint256.h>

#include <uint256.h>
#include <utilstrencodings.h>
#include <util/strencodings.h>
#include <crypto/common.h>

#include <stdio.h>
Expand Down
2 changes: 1 addition & 1 deletion src/base58.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <hash.h>
#include <uint256.h>
#include <utilstrencodings.h>
#include <util/strencodings.h>

#include <assert.h>
#include <string.h>
Expand Down
2 changes: 1 addition & 1 deletion src/bench/bech32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <validation.h>
#include <bech32.h>
#include <utilstrencodings.h>
#include <util/strencodings.h>

#include <vector>
#include <string>
Expand Down
4 changes: 2 additions & 2 deletions src/bench/bench_bitcoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include <crypto/sha256.h>
#include <key.h>
#include <random.h>
#include <util.h>
#include <utilstrencodings.h>
#include <util/system.h>
#include <util/strencodings.h>
#include <validation.h>

#include <memory>
Expand Down
2 changes: 1 addition & 1 deletion src/bench/block_assemble.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <scheduler.h>
#include <txdb.h>
#include <txmempool.h>
#include <utiltime.h>
#include <util/time.h>
#include <validation.h>
#include <validationinterface.h>

Expand Down
2 changes: 1 addition & 1 deletion src/bench/checkqueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <bench/bench.h>
#include <util.h>
#include <util/system.h>
#include <validation.h>
#include <checkqueue.h>
#include <prevector.h>
Expand Down
2 changes: 1 addition & 1 deletion src/bench/crypto_hash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <hash.h>
#include <random.h>
#include <uint256.h>
#include <utiltime.h>
#include <util/time.h>
#include <crypto/ripemd160.h>
#include <crypto/sha1.h>
#include <crypto/sha256.h>
Expand Down
2 changes: 1 addition & 1 deletion src/bench/examples.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <bench/bench.h>
#include <validation.h>
#include <utiltime.h>
#include <util/time.h>

// Sanity test: this should loop ten times, and
// min/max/average should be close to 100ms.
Expand Down
4 changes: 2 additions & 2 deletions src/bitcoin-cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#include <fs.h>
#include <rpc/client.h>
#include <rpc/protocol.h>
#include <util.h>
#include <utilstrencodings.h>
#include <util/system.h>
#include <util/strencodings.h>

#include <memory>
#include <stdio.h>
Expand Down
6 changes: 3 additions & 3 deletions src/bitcoin-tx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include <script/script.h>
#include <script/sign.h>
#include <univalue.h>
#include <util.h>
#include <utilmoneystr.h>
#include <utilstrencodings.h>
#include <util/system.h>
#include <util/moneystr.h>
#include <util/strencodings.h>

#include <memory>
#include <stdio.h>
Expand Down
4 changes: 2 additions & 2 deletions src/bitcoind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
#include <init.h>
#include <noui.h>
#include <shutdown.h>
#include <util.h>
#include <util/system.h>
#include <httpserver.h>
#include <httprpc.h>
#include <utilstrencodings.h>
#include <util/strencodings.h>
#include <walletinitinterface.h>

#include <stdio.h>
Expand Down
2 changes: 1 addition & 1 deletion src/blockencodings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <streams.h>
#include <txmempool.h>
#include <validation.h>
#include <util.h>
#include <util/system.h>

#include <unordered_map>

Expand Down
4 changes: 2 additions & 2 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#include <chainparamsseeds.h>
#include <consensus/merkle.h>
#include <tinyformat.h>
#include <util.h>
#include <utilstrencodings.h>
#include <util/system.h>
#include <util/strencodings.h>
#include <versionbitsinfo.h>

#include <assert.h>
Expand Down
4 changes: 2 additions & 2 deletions src/chainparamsbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#include <chainparamsbase.h>

#include <tinyformat.h>
#include <util.h>
#include <utilmemory.h>
#include <util/system.h>
#include <util/memory.h>

#include <assert.h>

Expand Down
2 changes: 1 addition & 1 deletion src/consensus/merkle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <consensus/merkle.h>
#include <hash.h>
#include <utilstrencodings.h>
#include <util/strencodings.h>

/* WARNING! If you're reading this because you're learning about crypto
and/or designing a new system that will use merkle trees, keep in mind
Expand Down
2 changes: 1 addition & 1 deletion src/consensus/tx_verify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// TODO remove the following dependencies
#include <chain.h>
#include <coins.h>
#include <utilmoneystr.h>
#include <util/moneystr.h>

bool IsFinalTx(const CTransaction &tx, int nBlockHeight, int64_t nBlockTime)
{
Expand Down
4 changes: 2 additions & 2 deletions src/core_read.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#include <serialize.h>
#include <streams.h>
#include <univalue.h>
#include <util.h>
#include <utilstrencodings.h>
#include <util/system.h>
#include <util/strencodings.h>
#include <version.h>

#include <boost/algorithm/string/classification.hpp>
Expand Down
6 changes: 3 additions & 3 deletions src/core_write.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
#include <serialize.h>
#include <streams.h>
#include <univalue.h>
#include <util.h>
#include <utilmoneystr.h>
#include <utilstrencodings.h>
#include <util/system.h>
#include <util/moneystr.h>
#include <util/strencodings.h>

UniValue ValueFromAmount(const CAmount& amount)
{
Expand Down
4 changes: 2 additions & 2 deletions src/dbwrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include <fs.h>
#include <serialize.h>
#include <streams.h>
#include <util.h>
#include <utilstrencodings.h>
#include <util/system.h>
#include <util/strencodings.h>
#include <version.h>

#include <leveldb/db.h>
Expand Down
2 changes: 1 addition & 1 deletion src/dummywallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <stdio.h>
#include <util.h>
#include <util/system.h>
#include <walletinitinterface.h>

class CWallet;
Expand Down
4 changes: 2 additions & 2 deletions src/httprpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#include <rpc/server.h>
#include <random.h>
#include <sync.h>
#include <util.h>
#include <utilstrencodings.h>
#include <util/system.h>
#include <util/strencodings.h>
#include <ui_interface.h>
#include <walletinitinterface.h>
#include <crypto/hmac_sha256.h>
Expand Down
4 changes: 2 additions & 2 deletions src/httpserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#include <chainparamsbase.h>
#include <compat.h>
#include <util.h>
#include <utilstrencodings.h>
#include <util/system.h>
#include <util/strencodings.h>
#include <netbase.h>
#include <rpc/protocol.h> // For HTTP status codes
#include <sync.h>
Expand Down
2 changes: 1 addition & 1 deletion src/index/base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <shutdown.h>
#include <tinyformat.h>
#include <ui_interface.h>
#include <util.h>
#include <util/system.h>
#include <validation.h>
#include <warnings.h>

Expand Down
2 changes: 1 addition & 1 deletion src/index/txindex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <index/txindex.h>
#include <shutdown.h>
#include <ui_interface.h>
#include <util.h>
#include <util/system.h>
#include <validation.h>

#include <boost/thread.hpp>
Expand Down
4 changes: 2 additions & 2 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
#include <txmempool.h>
#include <torcontrol.h>
#include <ui_interface.h>
#include <util.h>
#include <utilmoneystr.h>
#include <util/system.h>
#include <util/moneystr.h>
#include <validationinterface.h>
#include <warnings.h>
#include <walletinitinterface.h>
Expand Down
2 changes: 1 addition & 1 deletion src/init.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <memory>
#include <string>
#include <util.h>
#include <util/system.h>

class CScheduler;
class CWallet;
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <interfaces/handler.h>

#include <utilmemory.h>
#include <util/memory.h>

#include <boost/signals2/connection.hpp>
#include <utility>
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <sync.h>
#include <txmempool.h>
#include <ui_interface.h>
#include <util.h>
#include <util/system.h>
#include <validation.h>
#include <warnings.h>

Expand Down
2 changes: 1 addition & 1 deletion src/key_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <base58.h>
#include <bech32.h>
#include <script/script.h>
#include <utilstrencodings.h>
#include <util/strencodings.h>

#include <boost/variant/apply_visitor.hpp>
#include <boost/variant/static_visitor.hpp>
Expand Down
2 changes: 1 addition & 1 deletion src/keystore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include <keystore.h>

#include <util.h>
#include <util/system.h>

void CBasicKeyStore::ImplicitlyLearnRelatedKeyScripts(const CPubKey& pubkey)
{
Expand Down
2 changes: 1 addition & 1 deletion src/logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <logging.h>
#include <utiltime.h>
#include <util/time.h>

const char * const DEFAULT_DEBUGLOGFILE = "debug.log";

Expand Down
2 changes: 1 addition & 1 deletion src/merkleblock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include <hash.h>
#include <consensus/consensus.h>
#include <utilstrencodings.h>
#include <util/strencodings.h>


CMerkleBlock::CMerkleBlock(const CBlock& block, CBloomFilter* filter, const std::set<uint256>* txids)
Expand Down
4 changes: 2 additions & 2 deletions src/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#include <primitives/transaction.h>
#include <script/standard.h>
#include <timedata.h>
#include <util.h>
#include <utilmoneystr.h>
#include <util/system.h>
#include <util/moneystr.h>
#include <validationinterface.h>

#include <algorithm>
Expand Down
Loading

0 comments on commit 2068f08

Please sign in to comment.