From 3a76d34b7bfd4825f73ae7952639a63f83b946a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BD=D0=B8=D0=BB=D0=B0=20=D0=93=D0=BE=D1=80?= =?UTF-8?q?=D0=BD=D1=83=D1=88=D0=BA=D0=BE?= Date: Thu, 23 Nov 2023 01:11:41 +0300 Subject: [PATCH] Update comment from orig 65db823 --- components/console/linenoise/linenoise.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/components/console/linenoise/linenoise.c b/components/console/linenoise/linenoise.c index babc994..939d1df 100644 --- a/components/console/linenoise/linenoise.c +++ b/components/console/linenoise/linenoise.c @@ -256,7 +256,15 @@ static void freeCompletions(linenoiseCompletions *lc) { * input. * * The state of the editing is encapsulated into the pointed linenoiseState - * structure as described in the structure definition. */ + * structure as described in the structure definition. + * + * If the function returns non-zero, the caller should handle the + * returned value as a byte read from the standard input, and process + * it as usually: this basically means that the function may return a byte + * read from the termianl but not processed. Otherwise, if zero is returned, + * the input was consumed by the completeLine() function to navigate the + * possible completions, and the caller should read for the next characters + * from stdin. */ static int completeLine(struct linenoiseState *ls) { linenoiseCompletions lc = { 0, NULL }; int nread, nwritten;