In case the user wants to modify them.
Signed-off-by: Gregor Riepl <onitake@gmail.com>
Signed-off-by: Olivier Matz <zer0@droids-corp.org>
+/* configuration file for rdline module */
+
+/* Size of the line buffer */
+#define RDLINE_BUF_SIZE 64
+
+/* Size of the prompt buffer */
+#define RDLINE_PROMPT_SIZE 16
+
+/* Size of the buffer used to decode vt100 codes */
+#define RDLINE_VT100_BUF_SIZE 8
+
+/* Size of history buffer (in chars) */
+#define RDLINE_HISTORY_BUF_SIZE 128
#include <cirbuf.h>
#include <vt100.h>
+#include <rdline_config.h>
#define vt100_bell "\007"
#define vt100_bs "\010"
#define vt100_word_left "\033\142"
#define vt100_word_right "\033\146"
-/* configuration */
+/* default configuration */
+#ifndef RDLINE_BUF_SIZE
#define RDLINE_BUF_SIZE 64
+#endif
+#ifndef RDLINE_PROMPT_SIZE
#define RDLINE_PROMPT_SIZE 16
+#endif
+#ifndef RDLINE_VT100_BUF_SIZE
#define RDLINE_VT100_BUF_SIZE 8
+#endif
+#ifndef RDLINE_HISTORY_BUF_SIZE
#define RDLINE_HISTORY_BUF_SIZE 128
-#define RDLINE_HISTORY_MAX_LINE 64
+#endif
enum rdline_status {
RDLINE_STOPPED,
+/* configuration file for rdline module */
+
+/* Size of the line buffer */
+#define RDLINE_BUF_SIZE 64
+
+/* Size of the prompt buffer */
+#define RDLINE_PROMPT_SIZE 16
+
+/* Size of the buffer used to decode vt100 codes */
+#define RDLINE_VT100_BUF_SIZE 8
+
+/* Size of history buffer (in chars) */
+#define RDLINE_HISTORY_BUF_SIZE 128