mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Added reset_buffer()
This commit is contained in:
parent
21dea47f42
commit
ee56d1280d
3 changed files with 14 additions and 0 deletions
|
|
@ -256,6 +256,14 @@ bool match_regex(regex_t *regex)
|
|||
return false;
|
||||
}
|
||||
|
||||
// lua: reset_buffer()
|
||||
static int reset_buffer(lua_State *L)
|
||||
{
|
||||
(void)L;
|
||||
buffer_size = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// lua: expect(string, timeout)
|
||||
static int expect(lua_State *L)
|
||||
{
|
||||
|
|
@ -352,6 +360,7 @@ static const struct luaL_Reg tio_lib[] =
|
|||
{ "modem_send", modem_send},
|
||||
{ "send", send},
|
||||
{ "expect", expect},
|
||||
{ "reset_buffer", reset_buffer},
|
||||
{ "exit", exit_},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue