mirror of
https://github.com/monero-project/monero.git
synced 2025-12-31 15:06:11 -08:00
move input_line from command_line to simplewallet
It was only used there, and this removes one part of the common dependency on libreadline
This commit is contained in:
@@ -125,6 +125,19 @@ namespace
|
||||
|
||||
const command_line::arg_descriptor< std::vector<std::string> > arg_command = {"command", ""};
|
||||
|
||||
std::string input_line(const std::string& prompt)
|
||||
{
|
||||
#ifdef HAVE_READLINE
|
||||
rdln::suspend_readline pause_readline;
|
||||
#endif
|
||||
std::cout << prompt;
|
||||
|
||||
std::string buf;
|
||||
std::getline(std::cin, buf);
|
||||
|
||||
return epee::string_tools::trim(buf);
|
||||
}
|
||||
|
||||
inline std::string interpret_rpc_response(bool ok, const std::string& status)
|
||||
{
|
||||
std::string err;
|
||||
|
||||
Reference in New Issue
Block a user