add stdin helpers for password input support

This commit is contained in:
Karl-Johan Alm
2018-07-19 23:48:38 +09:00
committed by Karl-Johan Alm
parent b0e268d2f6
commit 0da503e947
3 changed files with 92 additions and 0 deletions

18
src/compat/stdin.h Normal file
View File

@@ -0,0 +1,18 @@
// Copyright (c) 2018 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_COMPAT_STDIN_H
#define BITCOIN_COMPAT_STDIN_H
struct NoechoInst {
NoechoInst();
~NoechoInst();
};
#define NO_STDIN_ECHO() NoechoInst _no_echo
bool StdinTerminal();
bool StdinReady();
#endif // BITCOIN_COMPAT_STDIN_H