X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/05437fb4cdb907816a4fc3ffafa2617fcf33266a..8506d791786eea8ee55db5418a8f646bb2dd3a6d:/avr/command.c diff --git a/avr/command.c b/avr/command.c index bb88794..c080527 100644 --- a/avr/command.c +++ b/avr/command.c @@ -6,7 +6,6 @@ #include #include #include -#include #include "config.h" #include "print-utils.h" @@ -35,7 +34,7 @@ int strcmp_PP(const FLASH char *s1, const FLASH char *s2) { unsigned char c1, c2; - while ((c1 = *(const FLASH unsigned char *)s1++) + while ((c1 = *(const FLASH unsigned char *)s1++) == (c2 = *(const FLASH unsigned char *)s2++)) if (c1 == 0) return 0; @@ -43,9 +42,9 @@ int strcmp_PP(const FLASH char *s1, const FLASH char *s2) return c1 - c2; } -int cmpstringp(const void *p1, const void *p2) +int cmpstring_PP(const void *p1, const void *p2) { - return strcmp_PP((*(const FLASH cmd_tbl_t **) p1)->name, + return strcmp_PP((*(const FLASH cmd_tbl_t **) p1)->name, (*(const FLASH cmd_tbl_t **) p2)->name); } @@ -87,7 +86,7 @@ command_ret_t _do_help(cmd_tbl_t *cmd_start, int cmd_items, cmd_tbl_t * cmdtp, } /* Sort command list */ - qsort(cmd_array, cmd_items, sizeof (cmd_tbl_t *), cmpstringp); + qsort(cmd_array, cmd_items, sizeof (cmd_tbl_t *), cmpstring_PP); /* print short help (usage) */ for (i = 0; i < cmd_items; i++) { @@ -98,10 +97,10 @@ command_ret_t _do_help(cmd_tbl_t *cmd_start, int cmd_items, cmd_tbl_t * cmdtp, return CMD_RET_FAILURE; if (usage == NULL) continue; -#ifdef GCC_BUG_61443 +#ifdef GCC_BUG_61443 print_usage_line(cmd_array[i]->name, max_len, usage); #else - printf_P(PSTR("%-" stringify(8) /*FIXME*/ "S - %S\n"), + printf_P(PSTR("%-" stringify(8) /*FIXME*/ "S - %S\n"), cmd_array[i]->name, usage); #endif }