]> cloudbase.mooo.com Git - z180-stamp.git/commitdiff
Autocomplete, long way to go...
authorLeo C <erbl259-lmu@yahoo.de>
Thu, 21 Aug 2014 08:32:33 +0000 (10:32 +0200)
committerLeo C <erbl259-lmu@yahoo.de>
Thu, 21 Aug 2014 08:32:33 +0000 (10:32 +0200)
avr/command.c
avr/command.h
avr/config.h
avr/debug.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;
index 4e96903855af0ea5c81621a070f4737cb5c36dd9..2fd20a0b4855382fb5d08911a123237d5c19e379 100644 (file)
@@ -82,7 +82,7 @@ command_ret_t cmd_usage(cmd_tbl_t *cmdtp);
 
 #ifdef CONFIG_AUTO_COMPLETE
 extern int var_complete(int argc, char * const argv[], char last_char, int maxv, char *cmdv[]);
-extern int cmd_auto_complete(const char *const prompt, char *buf, int *np, int *colp);
+extern int cmd_auto_complete(const FLASH char *const prompt, char *buf, int *np, int *colp);
 #endif
 
 /**
index 13de63bc80dc35f7ef07d400082c71c5cae22e4c..08d97bdb0221cc6c10cd6053acb5239f7abac6d9 100644 (file)
@@ -19,6 +19,7 @@
 #define CONFIG_SYS_PROMPT      "=> "
 
 
+/* TODO: */
 //#define CONFIG_CMDLINE_EDITING       1
 //#define CONFIG_AUTO_COMPLETE 1
 
index 74d8ab2ad35fcc1cd9388cdae411355f6c7a742f..fcbd2c107011760654cf12a862573b4353335207 100644 (file)
@@ -227,6 +227,8 @@ command_ret_t do_eep_cp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[
 /*------------------------------------------------------------------------------*/
 
 
+#if 0
+
 struct __freelist {
        size_t sz;
        struct __freelist *nx;
@@ -265,6 +267,7 @@ printfreelist(const char * title)
                (size_t) STACK_POINTER(), (size_t) __brkval, freesum);
 }
 
+#endif
 
 #endif /* DEBUG */