--- libaitcli/example/keys.h 2010/06/02 17:17:56 1.1.2.1 +++ libaitcli/example/keys.h 2010/06/04 12:08:32 1.1.4.3 @@ -131,8 +131,15 @@ #define STRSIZ 256 #define MAX_BINDKEY 559 +#define HISTORY_LINES 100 #define HISTORY_FILE "/tmp/.CLI.history" +#define CLI_PROMPT "test> " + +#define LINEMODE_RAW -1 +#define LINEMODE_INS 0 +#define LINEMODE_OVER 1 + #define RETCODE_ERR -1 #define RETCODE_OK 0 #define RETCODE_EOL 1 @@ -155,6 +162,11 @@ struct tagHistory { typedef TAILQ_HEAD(tqHistoryHead, tagHistory) history_t; typedef struct { + char line_mode; + + char *line_prompt; + + int line_bol; int line_eol; int line_len; char *line_buf; @@ -167,8 +179,6 @@ typedef struct { int line_in; int line_out; } linebuffer_t; - -typedef char history[STRSIZ]; typedef int (*cmd_func_t)(linebuffer_t * __restrict buffer, int argc, char ** __restrict argv); typedef struct {