From 9a7e2c153db20e7290a35b5e7a40e287dc9868a6 Mon Sep 17 00:00:00 2001 From: Jim Posen Date: Mon, 22 Oct 2018 15:51:11 -0700 Subject: [PATCH] scripted-diff: Move util files to separate directory. -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/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 -e 's/"util\.h"/"util\/system\.h"/g' $(git ls-files 'src/*.h' 'src/*.cpp') git checkout HEAD -- src/secp256k1 # exclude secp256k1, which has its own "util.h" sed -i -e 's/"utilmoneystr\.h"/"util\/moneystr\.h"/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i -e 's/"utilstrencodings\.h"/"util\/strencodings\.h"/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i -e 's///g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i -e 's/"utiltime\.h"/"util\/time\.h"/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i -e 's/BITCOIN_UTIL_H/BITCOIN_UTIL_SYSTEM_H/g' src/util/system.h sed -i -e 's/BITCOIN_UTILMONEYSTR_H/BITCOIN_UTIL_MONEYSTR_H/g' src/util/moneystr.h sed -i -e 's/BITCOIN_UTILSTRENCODINGS_H/BITCOIN_UTIL_STRENCODINGS_H/g' src/util/strencodings.h sed -i -e 's/BITCOIN_UTILTIME_H/BITCOIN_UTIL_TIME_H/g' src/util/time.h sed -i -e 's/ util\.\(h\|cpp\)/ util\/system\.\1/g' src/Makefile.am sed -i -e 's/utilmoneystr\.\(h\|cpp\)/util\/moneystr\.\1/g' src/Makefile.am sed -i -e 's/utilstrencodings\.\(h\|cpp\)/util\/strencodings\.\1/g' src/Makefile.am sed -i -e 's/utiltime\.\(h\|cpp\)/util\/time\.\1/g' src/Makefile.am sed -i -e 's/src\/util\.cpp/src\/util\/system\.cpp/g' test/lint/lint-locale-dependence.sh sed -i -e 's/src\/utilmoneystr\.cpp/src\/util\/moneystr\.cpp/g' test/lint/lint-locale-dependence.sh sed -i -e 's/src\/utilstrencodings\.\(h\|cpp\)/src\/util\/strencodings\.\1/g' test/lint/lint-locale-dependence.sh -END VERIFY SCRIPT- --- src/Makefile.am | 18 +++++++------- src/addrdb.cpp | 2 +- src/addrman.h | 2 +- src/alert.cpp | 2 +- src/arith_uint256.cpp | 2 +- src/asyncrpcqueue.cpp | 2 +- src/bench/Examples.cpp | 2 +- src/bench/bench_bitcoin.cpp | 2 +- src/bench/checkqueue.cpp | 2 +- src/bench/crypto_hash.cpp | 2 +- src/bench/verification.cpp | 2 +- src/bitcoin-cli.cpp | 4 ++-- src/bitcoin-tx.cpp | 6 ++--- src/bitcoind.cpp | 2 +- src/chainparams.cpp | 4 ++-- src/chainparamsbase.cpp | 2 +- src/consensus/params.cpp | 2 +- src/core_read.cpp | 4 ++-- src/core_write.cpp | 6 ++--- src/crypto/equihash.cpp | 2 +- src/crypto/equihash.h | 2 +- src/dbwrapper.cpp | 2 +- src/dbwrapper.h | 2 +- src/deprecation.cpp | 2 +- src/experimental_features.cpp | 2 +- src/gtest/json_test_vectors.h | 2 +- src/gtest/main.cpp | 2 +- src/gtest/test_coins.cpp | 2 +- src/gtest/test_consensus.cpp | 2 +- src/gtest/test_deprecation.cpp | 4 ++-- src/gtest/test_equihash.cpp | 2 +- src/gtest/test_foundersreward.cpp | 6 ++--- src/gtest/test_joinsplit.cpp | 4 ++-- src/gtest/test_mempool.cpp | 2 +- src/gtest/test_mempoollimit.cpp | 2 +- src/gtest/test_merkletree.cpp | 2 +- src/gtest/test_metrics.cpp | 2 +- src/gtest/test_miner.cpp | 2 +- src/gtest/test_rpc.cpp | 2 +- src/gtest/test_timedata.cpp | 2 +- src/gtest/test_txid.cpp | 4 ++-- src/gtest/utils.h | 2 +- src/httprpc.cpp | 4 ++-- src/httpserver.cpp | 2 +- src/init.cpp | 4 ++-- src/key_io.cpp | 2 +- src/keystore.cpp | 2 +- src/logging.cpp | 2 +- src/main.cpp | 4 ++-- src/mempool_limit.cpp | 2 +- src/merkleblock.cpp | 2 +- src/metrics.cpp | 8 +++---- src/miner.cpp | 4 ++-- src/net.h | 2 +- src/netbase.cpp | 4 ++-- src/noui.cpp | 2 +- src/policy/fees.cpp | 2 +- src/policy/policy.cpp | 4 ++-- src/primitives/block.cpp | 2 +- src/primitives/transaction.cpp | 2 +- src/protocol.cpp | 4 ++-- src/random.cpp | 2 +- src/rest.cpp | 2 +- src/rpc/blockchain.cpp | 2 +- src/rpc/client.cpp | 2 +- src/rpc/mining.cpp | 2 +- src/rpc/misc.cpp | 2 +- src/rpc/net.cpp | 2 +- src/rpc/protocol.cpp | 6 ++--- src/rpc/server.cpp | 4 ++-- src/script/script.cpp | 2 +- src/script/sigcache.cpp | 2 +- src/script/standard.cpp | 4 ++-- src/sendalert.cpp | 4 ++-- src/sync.cpp | 2 +- src/test/DoS_tests.cpp | 2 +- src/test/alert_tests.cpp | 2 +- src/test/allocator_tests.cpp | 2 +- src/test/base32_tests.cpp | 2 +- src/test/base58_tests.cpp | 4 ++-- src/test/base64_tests.cpp | 2 +- src/test/bech32_tests.cpp | 2 +- src/test/bip32_tests.cpp | 4 ++-- src/test/bloom_tests.cpp | 4 ++-- src/test/checkblock_tests.cpp | 2 +- src/test/checkqueue_tests.cpp | 4 ++-- src/test/coins_tests.cpp | 2 +- src/test/compress_tests.cpp | 2 +- src/test/convertbits_tests.cpp | 2 +- src/test/crypto_tests.cpp | 2 +- src/test/getarg_tests.cpp | 2 +- src/test/hash_tests.cpp | 2 +- src/test/key_tests.cpp | 4 ++-- src/test/mempool_tests.cpp | 2 +- src/test/miner_tests.cpp | 2 +- src/test/policyestimator_tests.cpp | 2 +- src/test/pow_tests.cpp | 2 +- src/test/rpc_tests.cpp | 2 +- src/test/script_tests.cpp | 2 +- src/test/serialize_tests.cpp | 2 +- src/test/sighash_tests.cpp | 2 +- src/test/skiplist_tests.cpp | 2 +- src/test/txvalidationcache_tests.cpp | 2 +- src/test/util_tests.cpp | 6 ++--- src/timedata.cpp | 4 ++-- src/torcontrol.cpp | 4 ++-- src/transaction_builder.cpp | 2 +- src/txmempool.cpp | 4 ++-- src/uint256.cpp | 2 +- src/{utilmoneystr.cpp => util/moneystr.cpp} | 4 ++-- src/{utilmoneystr.h => util/moneystr.h} | 6 ++--- .../strencodings.cpp} | 2 +- .../strencodings.h} | 6 ++--- src/{util.cpp => util/system.cpp} | 6 ++--- src/{util.h => util/system.h} | 8 +++---- src/{utiltime.cpp => util/time.cpp} | 2 +- src/{utiltime.h => util/time.h} | 6 ++--- .../asyncrpcoperation_mergetoaddress.cpp | 6 ++--- .../asyncrpcoperation_saplingmigration.cpp | 4 ++-- src/wallet/asyncrpcoperation_sendmany.cpp | 6 ++--- .../asyncrpcoperation_shieldcoinbase.cpp | 6 ++--- src/wallet/crypter.cpp | 2 +- src/wallet/db.cpp | 4 ++-- src/wallet/gtest/test_paymentdisclosure.cpp | 6 ++--- src/wallet/gtest/test_wallet_zkeys.cpp | 2 +- src/wallet/paymentdisclosure.cpp | 2 +- src/wallet/paymentdisclosuredb.cpp | 2 +- src/wallet/rpcdisclosure.cpp | 4 ++-- src/wallet/rpcdump.cpp | 4 ++-- src/wallet/rpcwallet.cpp | 8 +++---- src/wallet/test/crypto_tests.cpp | 2 +- src/wallet/wallet.cpp | 2 +- src/wallet/wallet.h | 4 ++-- src/wallet/walletdb.cpp | 4 ++-- src/warnings.cpp | 2 +- src/zcash/Address.cpp | 2 +- src/zcash/address/unified.cpp | 2 +- src/zcash/address/zip32.h | 2 +- src/zcbenchmarks.cpp | 2 +- src/zmq/zmqabstractnotifier.cpp | 2 +- src/zmq/zmqnotificationinterface.cpp | 2 +- src/zmq/zmqpublishnotifier.cpp | 2 +- test/lint/lint-locale-dependence.sh | 24 +++++++++---------- 143 files changed, 228 insertions(+), 228 deletions(-) rename src/{utilmoneystr.cpp => util/moneystr.cpp} (97%) rename src/{utilmoneystr.h => util/moneystr.h} (84%) rename src/{utilstrencodings.cpp => util/strencodings.cpp} (99%) rename src/{utilstrencodings.h => util/strencodings.h} (98%) rename src/{util.cpp => util/system.cpp} (99%) rename src/{util.h => util/system.h} (98%) rename src/{utiltime.cpp => util/time.cpp} (98%) rename src/{utiltime.h => util/time.h} (86%) diff --git a/src/Makefile.am b/src/Makefile.am index 7a878a430..f6d436e74 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -283,12 +283,12 @@ BITCOIN_CORE_H = \ uint256.h \ uint252.h \ undo.h \ - util.h \ + util/system.h \ util/match.h \ - utilmoneystr.h \ - utilstrencodings.h \ + util/moneystr.h \ + util/strencodings.h \ utiltest.h \ - utiltime.h \ + util/time.h \ validationinterface.h \ version.h \ wallet/asyncrpcoperation_common.h \ @@ -492,10 +492,10 @@ libbitcoin_util_a_SOURCES = \ support/cleanse.cpp \ sync.cpp \ uint256.cpp \ - util.cpp \ - utilmoneystr.cpp \ - utilstrencodings.cpp \ - utiltime.cpp \ + util/system.cpp \ + util/moneystr.cpp \ + util/strencodings.cpp \ + util/time.cpp \ $(BITCOIN_CORE_H) \ $(LIBZCASH_H) @@ -635,7 +635,7 @@ libzcash_script_la_SOURCES = \ script/interpreter.cpp \ script/script.cpp \ uint256.cpp \ - utilstrencodings.cpp + util/strencodings.cpp if GLIBC_BACK_COMPAT libzcash_script_la_SOURCES += compat/glibc_compat.cpp diff --git a/src/addrdb.cpp b/src/addrdb.cpp index d68002933..763a62693 100644 --- a/src/addrdb.cpp +++ b/src/addrdb.cpp @@ -13,7 +13,7 @@ #include "random.h" #include "streams.h" #include "tinyformat.h" -#include "util.h" +#include "util/system.h" #include diff --git a/src/addrman.h b/src/addrman.h index 8b287edbd..894b2b287 100644 --- a/src/addrman.h +++ b/src/addrman.h @@ -10,7 +10,7 @@ #include "random.h" #include "sync.h" #include "timedata.h" -#include "util.h" +#include "util/system.h" #include #include diff --git a/src/alert.cpp b/src/alert.cpp index 68ba7589f..781fb819b 100644 --- a/src/alert.cpp +++ b/src/alert.cpp @@ -11,7 +11,7 @@ #include "pubkey.h" #include "timedata.h" #include "ui_interface.h" -#include "util.h" +#include "util/system.h" #include #include diff --git a/src/arith_uint256.cpp b/src/arith_uint256.cpp index 6c2f8dbea..e117a5200 100644 --- a/src/arith_uint256.cpp +++ b/src/arith_uint256.cpp @@ -6,7 +6,7 @@ #include "arith_uint256.h" #include "uint256.h" -#include "utilstrencodings.h" +#include "util/strencodings.h" #include "crypto/common.h" #include diff --git a/src/asyncrpcqueue.cpp b/src/asyncrpcqueue.cpp index ddee22df3..776dc7fed 100644 --- a/src/asyncrpcqueue.cpp +++ b/src/asyncrpcqueue.cpp @@ -3,7 +3,7 @@ // file COPYING or https://www.opensource.org/licenses/mit-license.php . #include "asyncrpcqueue.h" -#include "util.h" +#include "util/system.h" static std::atomic workerCounter(0); diff --git a/src/bench/Examples.cpp b/src/bench/Examples.cpp index ee9c60482..802847020 100644 --- a/src/bench/Examples.cpp +++ b/src/bench/Examples.cpp @@ -5,7 +5,7 @@ #include "bench.h" #include "main.h" -#include "utiltime.h" +#include "util/time.h" // Sanity test: this should loop ten times, and // min/max/average should be close to 100ms. diff --git a/src/bench/bench_bitcoin.cpp b/src/bench/bench_bitcoin.cpp index 5a118c2bb..5ac830746 100644 --- a/src/bench/bench_bitcoin.cpp +++ b/src/bench/bench_bitcoin.cpp @@ -8,7 +8,7 @@ #include "fs.h" #include "key.h" #include "main.h" -#include "util.h" +#include "util/system.h" #include "librustzcash.h" diff --git a/src/bench/checkqueue.cpp b/src/bench/checkqueue.cpp index c44e23620..ba42692c7 100644 --- a/src/bench/checkqueue.cpp +++ b/src/bench/checkqueue.cpp @@ -4,7 +4,7 @@ // file COPYING or https://www.opensource.org/licenses/mit-license.php . #include "bench.h" -#include "util.h" +#include "util/system.h" #include "main.h" #include "checkqueue.h" #include "prevector.h" diff --git a/src/bench/crypto_hash.cpp b/src/bench/crypto_hash.cpp index 298316c4e..7b32c9513 100644 --- a/src/bench/crypto_hash.cpp +++ b/src/bench/crypto_hash.cpp @@ -8,7 +8,7 @@ #include "bench.h" #include "bloom.h" #include "random.h" -#include "utiltime.h" +#include "util/time.h" #include "crypto/ripemd160.h" #include "crypto/sha1.h" #include "crypto/sha256.h" diff --git a/src/bench/verification.cpp b/src/bench/verification.cpp index 1b5300a40..d79bf7b04 100644 --- a/src/bench/verification.cpp +++ b/src/bench/verification.cpp @@ -11,7 +11,7 @@ #include "script/sign.h" #include "streams.h" #include "uint256.h" -#include "utilstrencodings.h" +#include "util/strencodings.h" #include "version.h" #include "librustzcash.h" diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index e7db3fb36..93b1d9505 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -9,8 +9,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 diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp index a59825d2b..acf004533 100644 --- a/src/bitcoin-tx.cpp +++ b/src/bitcoin-tx.cpp @@ -15,9 +15,9 @@ #include "script/script.h" #include "script/sign.h" #include -#include "util.h" -#include "utilmoneystr.h" -#include "utilstrencodings.h" +#include "util/system.h" +#include "util/moneystr.h" +#include "util/strencodings.h" #include diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index c8bb23b30..739584e75 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -12,7 +12,7 @@ #include "main.h" #include "noui.h" #include "scheduler.h" -#include "util.h" +#include "util/system.h" #include "httpserver.h" #include "httprpc.h" diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 91166d93f..e169d116b 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -9,8 +9,8 @@ #include "crypto/equihash.h" #include "tinyformat.h" -#include "util.h" -#include "utilstrencodings.h" +#include "util/system.h" +#include "util/strencodings.h" #include #include diff --git a/src/chainparamsbase.cpp b/src/chainparamsbase.cpp index ce3eeb106..b3281a773 100644 --- a/src/chainparamsbase.cpp +++ b/src/chainparamsbase.cpp @@ -7,7 +7,7 @@ #include "chainparamsbase.h" #include "tinyformat.h" -#include "util.h" +#include "util/system.h" #include diff --git a/src/consensus/params.cpp b/src/consensus/params.cpp index 5fd7fedbf..9aed34ac8 100644 --- a/src/consensus/params.cpp +++ b/src/consensus/params.cpp @@ -8,7 +8,7 @@ #include #include