Add support for > and >> prompts with new readline

This commit is contained in:
2023-05-18 22:09:54 -04:00
parent eb43c99f47
commit d3c4c0801d
9 changed files with 47 additions and 9 deletions

View File

@@ -204,6 +204,10 @@ public:
//
std::ostream &stdostream() { return get_stdio_channel()->out()->ostream(); }
// Set the prompt for the console.
//
void set_console_prompt(const eng::string &prompt);
// Fetches the lua source, and takes ownership of it. The DrivenEngine
// no longer contains the source after calling this.
//
@@ -262,6 +266,7 @@ public:
bool drv_get_channel_released(uint32_t chid) const;
void drv_get_outgoing(uint32_t chid, uint32_t *len, const char **data) const;
bool drv_get_outgoing_empty(uint32_t chid) const;
void drv_get_console_prompt(uint32_t *len, const char **data) const;
double drv_get_clock() const;
bool drv_get_rescan_lua_source() const;
bool drv_get_stop_driver() const;
@@ -294,6 +299,7 @@ private:
bool rescan_lua_source_;
double clock_;
bool stop_driver_;
eng::string console_prompt_;
friend class Channel;
};