]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - include/command.h
Remove local copy of avr-libc time lib.
[z180-stamp.git] / include / command.h
index d7eccc932da18dbb624ce3186412f0729b627978..6109f9f97b969d4a7018ae4e26d1c59a8b4d9f48 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2014-2016 Leo C. <erbl259-lmu@yahoo.de>
+ * (C) Copyright 2014-2016, 2018 Leo C. <erbl259-lmu@yahoo.de>
  *
  * (C) Copyright 2000-2009
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
@@ -50,13 +50,12 @@ struct cmd_tbl_s {
        uint8_t         maxargs;                        /* maximum number of arguments  */
        uint8_t         flags;                  /* autorepeat allowed?          */
                                                                /* Implementation function      */
-       command_ret_t   (*cmd)(const FLASH struct cmd_tbl_s *, uint_fast8_t, int, char * const []);
+       command_ret_t   (*cmd)(cmd_tbl_t *, uint_fast8_t, int, char * const []);
        const FLASH char *usage;        /* Usage message        (short) */
 #ifdef CONFIG_SYS_LONGHELP
        const FLASH char *help;         /* Help  message        (long)  */
 #endif
        cmd_tbl_t *subcmd;
-//     const FLASH struct cmd_tbl_s *subcommands;
 #ifdef CONFIG_AUTO_COMPLETE
        /* do auto completion on the arguments */
        int             (*complete)(int argc, char * const argv[], char last_char, int maxv, char *cmdv[]);
@@ -82,7 +81,6 @@ cmd_process(uint_fast8_t flag, int argc, char * const argv[], uint_fast8_t *repe
 /* command.c */
 command_ret_t do_help(cmd_tbl_t *cmdtp, uint_fast8_t flag, int argc, char * const argv[]);
 
-int cmd_tbl_item_count(cmd_tbl_t *p);
 command_ret_t cmd_usage(cmd_tbl_t *cmdtp);
 
 #ifdef CONFIG_AUTO_COMPLETE
@@ -99,6 +97,13 @@ extern int cmd_auto_complete(const FLASH char *const prompt, char *buf, int *np,
  */
 int cmd_process_error(cmd_tbl_t *cmdtp, int err);
 
+/**
+ * cmd_error() - print error message
+ *
+ * @fmt:
+ */
+void cmd_error(int status, int errnum, const char *fmt, ...);
+
 /*
  * Monitor Command
  *