summaryrefslogtreecommitdiff
path: root/com32/hdt/hdt-cli.h
diff options
context:
space:
mode:
authorErwan Velu <erwan.velu@free.fr>2009-03-20 22:50:55 +0100
committerErwan Velu <erwan.velu@free.fr>2009-03-20 22:50:55 +0100
commit26c171bfc25c17ddbf7230cf40c33270244eea36 (patch)
treeabff2708cb6f10d4acb89b95b107b7e3fbff04c9 /com32/hdt/hdt-cli.h
parente94feba4b1844e34f27b6720157e886707cd6e00 (diff)
downloadsyslinux-26c171bfc25c17ddbf7230cf40c33270244eea36.tar.gz
hdt: Adding an history
Impact: UP & Down keys can be used to reach the command history UP & Down keys can be used to parse the history
Diffstat (limited to 'com32/hdt/hdt-cli.h')
-rw-r--r--com32/hdt/hdt-cli.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/com32/hdt/hdt-cli.h b/com32/hdt/hdt-cli.h
index 34fddf1d..05fb143b 100644
--- a/com32/hdt/hdt-cli.h
+++ b/com32/hdt/hdt-cli.h
@@ -67,11 +67,16 @@ typedef enum {
VESA_MODE,
} cli_mode_t;
+#define PROMPT_SIZE 32
+#define MAX_HISTORY_SIZE 32
struct s_cli {
cli_mode_t mode;
- char prompt[32];
+ char prompt[PROMPT_SIZE];
char input[MAX_LINE_SIZE];
int cursor_pos;
+ char history[MAX_HISTORY_SIZE][MAX_LINE_SIZE];
+ int history_pos;
+ int max_history_pos;
};
/* A command-line command */