aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include/readline_buffer.h
diff options
context:
space:
mode:
authorHoward Chu <hyc@symas.com>2017-08-21 12:55:06 +0100
committerHoward Chu <hyc@symas.com>2017-08-22 08:30:04 +0100
commitc088d38a57f6be5c8399a8c2243b2862d9f67cbe (patch)
treee66c0e3f8a211f95cad796a51933af27aeb0d3d3 /contrib/epee/include/readline_buffer.h
parentMerge pull request #2303 (diff)
downloadmonero-c088d38a57f6be5c8399a8c2243b2862d9f67cbe.tar.xz
Simplify readline support
And don't use std::mutex
Diffstat (limited to 'contrib/epee/include/readline_buffer.h')
-rw-r--r--contrib/epee/include/readline_buffer.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/epee/include/readline_buffer.h b/contrib/epee/include/readline_buffer.h
index 28a153414..cda7e34f9 100644
--- a/contrib/epee/include/readline_buffer.h
+++ b/contrib/epee/include/readline_buffer.h
@@ -8,25 +8,25 @@
namespace rdln
{
+ typedef enum { empty, partial, full } linestatus;
class readline_buffer : public std::stringbuf
{
public:
readline_buffer();
void start();
void stop();
- int process();
bool is_running() const
{
return m_cout_buf != NULL;
}
- void get_line(std::string& line) const;
+ linestatus get_line(std::string& line) const;
void set_prompt(const std::string& prompt);
static void add_completion(const std::string& command);
static const std::vector<std::string>& get_completions();
protected:
virtual int sync();
-
+
private:
std::streambuf* m_cout_buf;
static std::vector<std::string>& completion_commands();