summaryrefslogtreecommitdiff
path: root/src/user/include/libterm/readline.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/include/libterm/readline.h')
-rw-r--r--src/user/include/libterm/readline.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/user/include/libterm/readline.h b/src/user/include/libterm/readline.h
index b1d5b0a..fdfb408 100644
--- a/src/user/include/libterm/readline.h
+++ b/src/user/include/libterm/readline.h
@@ -3,8 +3,14 @@
#include <stdint.h>
+struct history;
+
+//returns zero if memory allocation failed or if max_entries was zero or one
+struct history *new_history(uint32_t max_entries);
+
//returns length of string without null terminator
//max_length doesn't include null terminator
-uint32_t read_line(char *sz, uint32_t max_length, const char *prompt);
+//pass null pointer in hist for no history
+uint32_t read_line(char *sz, uint32_t max_length, const char *prompt, struct history *hist);
#endif \ No newline at end of file