aboutsummaryrefslogtreecommitdiff
path: root/libbb/lineedit.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/lineedit.c')
-rw-r--r--libbb/lineedit.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 62f8949d6..a018a53ff 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -1253,6 +1253,11 @@ static void win_changed(int nsig)
#undef CTRL
#define CTRL(a) ((a) & ~0x40)
+/* Returns:
+ * -1 on read errors or EOF, or on bare Ctrl-D.
+ * 0 on ctrl-C,
+ * >0 length of input string, including terminating '\n'
+ */
int read_line_input(const char* prompt, char* command, int maxsize, line_input_t *st)
{
int lastWasTab = FALSE;