Changeset f4338d2 in mainline for generic/include


Ignore:
Timestamp:
2005-11-26T22:48:17Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a8c48241
Parents:
ff3b3197
Message:

Improve kconsole's support for recognition of commands with arguments.
Implement ARG_TYPE_STRING.
Add 'describe' command.
Move kconsole.c to generic/src/console.
Move kconsole.h to generic/include/console.

Location:
generic/include
Files:
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • generic/include/console/kconsole.h

    rff3b3197 rf4338d2  
    4444        cmd_arg_type_t type;            /**< Type descriptor. */
    4545        void *buffer;                   /**< Buffer where to store data. */
    46         size_t buflen;                  /**< Size of the buffer. */
     46        size_t len;                     /**< Size of the buffer. */
    4747};
    4848
     
    5353        const char *name;               /**< Command name. */
    5454        const char *description;        /**< Textual description. */
    55         int (* func)(cmd_arg_t *cmd);   /**< Function implementing the command. */
     55        int (* func)(cmd_arg_t *);      /**< Function implementing the command. */
    5656        count_t argc;                   /**< Number of arguments. */
    5757        cmd_arg_t *argv;                /**< Argument vector. */
     58        void (* help)(void);            /**< Function for printing detailed help. */
    5859};
    5960
  • generic/include/func.h

    rff3b3197 rf4338d2  
    3838
    3939extern size_t strlen(const char *str);
    40 extern int strcmp(const char *src, const char *dst, size_t len);
     40extern int strncmp(const char *src, const char *dst, size_t len);
     41extern void strncpy(char *dest, const char *src, size_t len);
    4142
    4243#endif
  • generic/include/macros.h

    rff3b3197 rf4338d2  
    3737#define is_white(c)     (((c) == ' ') || ((c) == '\t') || ((c) == '\n') || ((c) == '\r'))
    3838
     39#define min(a,b)        ((a)<(b)?(a):(b))
     40#define max(a,b)        ((a)>(b)?(a):(b))
     41
    3942#endif
Note: See TracChangeset for help on using the changeset viewer.