diff options
-rw-r--r-- | src/common/command_line.cpp | 18 | ||||
-rw-r--r-- | src/common/command_line.h | 2 | ||||
-rw-r--r-- | src/simplewallet/simplewallet.cpp | 13 |
3 files changed, 13 insertions, 20 deletions
diff --git a/src/common/command_line.cpp b/src/common/command_line.cpp index 2117aa968..4b9ca9559 100644 --- a/src/common/command_line.cpp +++ b/src/common/command_line.cpp @@ -36,10 +36,6 @@ #include "cryptonote_config.h" #include "string_tools.h" -#ifdef HAVE_READLINE - #include "readline_buffer.h" -#endif - namespace command_line { namespace @@ -50,20 +46,6 @@ namespace command_line } } - 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); - - } - bool is_yes(const std::string& str) { if (str == "y" || str == "Y") diff --git a/src/common/command_line.h b/src/common/command_line.h index 70242fdf3..c2bac9cc8 100644 --- a/src/common/command_line.h +++ b/src/common/command_line.h @@ -41,8 +41,6 @@ namespace command_line { - std::string input_line(const std::string& prompt); - //! \return True if `str` is `is_iequal("y" || "yes" || `tr("yes"))`. bool is_yes(const std::string& str); //! \return True if `str` is `is_iequal("n" || "no" || `tr("no"))`. diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 3d8d395db..2698b709e 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -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; |