1/* see license file for copyright and license details */
2#ifndef REDLINE_H_
3#define REDLINE_H_
4
5#include <stddef.h>
6
7struct redlineCompletions {
8 size_t len;
9 char **cvec;
10};
11
12char *redline(const char *prompt);
13void redlineSetCompletionCallback(void (*cb)(const char *, struct redlineCompletions *));
14void redlineAddCompletion(struct redlineCompletions *lc, const char *str);
15void redlineHistoryAdd(const char *line);
16void redlineHistorySetMaxLen(int len);
17int redlineHistorySave(const char *filename);
18int redlineHistoryLoad(const char *filename);
19char *redlineHistoryGet(int idx);
20int redlineHistoryLen(void);
21void redlineSetMultiLine(int ml);
22void redlineClearScreen(void);
23
24#endif /* REDLINE_H_ */