search for: cmd_reverse_search

Displaying 6 results from an estimated 6 matches for "cmd_reverse_search".

2013 Sep 17
1
[PATCH 3/4 v2] com32: Fix bugs on cmd_reverse_search (Triple fault dimension)
cmd_reverse_search has a bug that the variable cursor is updated even if a command wasn't found. If this happens, and the next key falls into the default case, memmove's size parameter would be a negative number. This bug can be reproduced by doing the following: On cmd_reverse_search (ctrl-r), type multiple...
2013 Sep 16
0
[PATCH 1/2] com32: Fix bugs on cmd_reverse_search (Triple fault dimension)
cmd_reverse_search has a bug that the variable cursor is updated even if a command wasn't found. If this happens, and the next key falls into the default case, memmove's size parameter would be a negative number. This bug can be reproduced by doing the following: On cmd_reverse_search (ctrl-r), type multiple...
2012 May 04
3
[GIT PULL] elflink fixes
...; - - if (key != KEY_NONE) { - //dprintf("get key 0x%x", key); - return key; - } - - if (timeout) { - if (timeout <= t) { - //dprintf("timeout"); - return KEY_NONE; - } - - timeout -= t; + *tto -= t1; } } + + return key; } -static const char * cmd_reverse_search(int *cursor) +static const char * cmd_reverse_search(int *cursor, clock_t *kbd_to, + clock_t *tto) { int key; int i = 0; @@ -83,7 +72,7 @@ static const char * cmd_reverse_search(int *cursor) eprintf("\033[1G\033[1;36m(reverse-i-search)`': \033[0m"); wh...
2011 Mar 16
0
[GIT PULL] elflink changes
...iles changed, 92 insertions(+), 14 deletions(-) diff --git a/com32/elflink/ldlinux/cli.c b/com32/elflink/ldlinux/cli.c index 77d32cd..defc6d0 100644 --- a/com32/elflink/ldlinux/cli.c +++ b/com32/elflink/ldlinux/cli.c @@ -68,6 +68,65 @@ int mygetkey(clock_t timeout) } } +static const char * cmd_reverse_search(int *cursor) +{ + int key; + int i = 0; + char buf[MAX_CMDLINE_LEN]; + const char *p = NULL; + struct cli_command *last_found; + struct cli_command *last_good = NULL; + + last_found = list_entry(cli_history_head.next, typeof(*last_found), list); + + memset(buf, 0, MAX_CMDLIN...
2010 Oct 03
3
[PATCH 0/3] elflink: Another small fixes on CLI
Hi, This is a another small set of fixes about CLI on elflink branch. Liu Aleaxander (3): elflink: use 'input' as the prompt of the CLI elflink: Add ctrl-R key bind support elflink: handle the NULL return of edit_cmdline core/elflink/cli.c | 88 +++++++++++++++++++++++++++++++++++++++++--- core/elflink/load_env32.c | 4 ++- 2 files changed, 85 insertions(+), 7
2012 Apr 17
2
[GIT PULL] elflink warning fixes and auto extension support
...slinux_init(void) +void __constructor __syslinux_init(void) { static com32sys_t reg; diff --git a/com32/elflink/ldlinux/cli.c b/com32/elflink/ldlinux/cli.c index fb041ae..498644e 100644 --- a/com32/elflink/ldlinux/cli.c +++ b/com32/elflink/ldlinux/cli.c @@ -99,7 +99,7 @@ static const char * cmd_reverse_search(int *cursor) break; } - while (last_found != &cli_history_head) { + while (!list_is_last(&last_found->list, &cli_history_head)) { p = strstr(last_found->command, buf); if (p) break; @@ -139,7 +139,7 @@ const char *edit_cmdline(const char *input, int...