--- libaitcli/inc/aitcli.h 2025/12/21 23:21:40 1.14.4.2 +++ libaitcli/inc/aitcli.h 2025/12/25 20:35:07 1.15 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitcli.h,v 1.14.4.2 2025/12/21 23:21:40 misho Exp $ +* $Id: aitcli.h,v 1.15 2025/12/25 20:35:07 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -237,6 +237,9 @@ typedef struct { int line_eol; int line_len; char *line_buf; + + int line_posin; + int line_lenin; char *line_input; const struct tagHistory *line_h; @@ -482,6 +485,13 @@ int cli_loadHistory(linebuffer_t * __restrict cli_buff void cli_resetHistory(linebuffer_t * __restrict cli_buffer); /* + * cli_freeInput() - Clear entire input + * + * @cli_buffer = CLI buffer + * return: RETCODE_ERR error, RETCODE_OK ok +*/ +int cli_freeInput(linebuffer_t * __restrict cli_buffer); +/* * cli_freeLine() - Clear entire line * * @cli_buffer = CLI buffer @@ -562,6 +572,14 @@ int cliEcho(linebuffer_t * __restrict cli_buffer, int * return: NULL if error or !=NULL readed line, must be e_free after use! */ char *cliReadLine(linebuffer_t * __restrict cli_buffer, int timeout); +/* + * cliInputLine() - Input line from opened CLI session + * + * @cli_buffer = CLI buffer + * @timeout = Session timeout (-1 infinit) + * return: NULL if error or !=NULL readed line, must be e_free after use! +*/ +char *cliInputLine(linebuffer_t * __restrict cli_buffer, int timeout); /* * cliRun() - CLI run command line