]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - avr/command.c
Autocomplete, long way to go...
[z180-stamp.git] / avr / command.c
index 9eb0ed262ef12f959972d1fe46e94f586924ccf3..15b1c7299b65c9d2b372ca61a9bf67785456a873 100644 (file)
@@ -194,7 +194,7 @@ command_ret_t cmd_usage(const FLASH cmd_tbl_t *cmdtp)
 
 int var_complete(int argc, char * const argv[], char last_char, int maxv, char *cmdv[])
 {
-       static char tmp_buf[512];
+       static char tmp_buf[CONFIG_SYS_CBSIZE];
        int space;
 
        space = last_char == '\0' || isblank(last_char);
@@ -210,6 +210,8 @@ int var_complete(int argc, char * const argv[], char last_char, int maxv, char *
 
 /*************************************************************************************/
 
+/* TODO: cmdtp points to FLASH */
+
 static int complete_cmdv(int argc, char * const argv[], char last_char, int maxv, char *cmdv[])
 {
        cmd_tbl_t *cmdtp = cmd_tbl;
@@ -357,6 +359,7 @@ static int find_common_prefix(char * const argv[])
 
 static char tmp_buf[CONFIG_SYS_CBSIZE];        /* copy of console I/O buffer   */
 
+
 int cmd_auto_complete(const FLASH char *const prompt, char *buf, int *np, int *colp)
 {
        int n = *np, col = *colp;