From a9cc0fba7daf0908511c1e462cfafc87eb2aa564 Mon Sep 17 00:00:00 2001 From: Davis C Date: Wed, 17 Apr 2024 11:04:51 -0500 Subject: [PATCH] Revert "Added `reset_buffer()`" This reverts commit ee56d1280d022a84870603378f0512ac3cabeba2. --- README.md | 3 --- man/tio.1.in | 2 -- src/script.c | 9 --------- 3 files changed, 14 deletions(-) diff --git a/README.md b/README.md index bd38050..f084d0e 100644 --- a/README.md +++ b/README.md @@ -265,9 +265,6 @@ In addition to the Lua API tio makes the following functions available: help to make the lines physically switch as simultaneously as possible. This may solve timing issues on some platforms. - reset_buffer() - Flush the internal ring buffer. - Note: Line can be any of DTR, RTS, CTS, DSR, CD, RI ``` diff --git a/man/tio.1.in b/man/tio.1.in index ead3967..17871f1 100644 --- a/man/tio.1.in +++ b/man/tio.1.in @@ -401,8 +401,6 @@ Set tty line state configuration to low. Apply tty line state configuration. Using the line state configuration API instead of high()/low() will help to make the lines physically switch as simultaneously as possible. This may solve timing issues on some platforms. -.IP "\fBreset_buffer()" -Flush the internal ring buffer. .TP 0n Note: Line can be any of DTR, RTS, CTS, DSR, CD, RI diff --git a/src/script.c b/src/script.c index 410085a..6b99ec2 100644 --- a/src/script.c +++ b/src/script.c @@ -256,14 +256,6 @@ 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) { @@ -360,7 +352,6 @@ static const struct luaL_Reg tio_lib[] = { "modem_send", modem_send}, { "send", send}, { "expect", expect}, - { "reset_buffer", reset_buffer}, { "exit", exit_}, {NULL, NULL} };