HomePhabricator

Refactor: Replace fprintf with tfm::format

Description

Refactor: Replace fprintf with tfm::format

Summary:

  • tinyformat: Add doc to Bitcoin Core specific strprintf
  • scripted-diff: Replace fprintf with tfm::format

-BEGIN VERIFY SCRIPT-
sed -i --regexp-extended -e 's/fprintf\(std(err|out), /tfm::format(std::c\1, /g' $(git grep -l 'fprintf(' -- ':(exclude)src/crypto' ':(exclude)src/leveldb' ':(exclude)src/univalue' ':(exclude)src/secp256k1')
-END VERIFY SCRIPT-

fixup! scripted-diff: Replace fprintf with tfm::format

  • Replace remaining fprintf with tfm::format manually

This is a backport of Core PR16205

Test Plan:

grep -r ../src/ -e fprintf | grep -v leveldb | grep -v secp256k1 | grep -v univalue

Check that there are no mre unexpected callsites.

ninja all check-all
arc lint --everything

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D5782

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on Jun 13 2019, 13:04
deadalnixCommitted on Apr 20 2020, 18:08
deadalnixPushed on Apr 20 2020, 18:08
Reviewer
Restricted Project
Differential Revision
D5782: Refactor: Replace fprintf with tfm::format
Parents
rABC43d44b2e899b: Merge #14885: rpc: Assert named arguments are unique in RPCHelpMan
Branches
Unknown
Tags
Unknown