diff options
author | Leo C | 2014-11-25 10:47:55 +0100 |
---|---|---|
committer | Leo C | 2014-11-25 10:47:55 +0100 |
commit | c79c80b49dcde54add2e9ba323c9d07033723f52 (patch) | |
tree | fbf980c28880e9ed948d8d21feb8d98707d28eda /avr/command.c | |
parent | 1222f338a23212010c7e2d0d7c3a2861e42fa8df (diff) | |
download | z180-stamp-c79c80b49dcde54add2e9ba323c9d07033723f52.zip |
Enable pullups on all gpio pins. cleanup
Diffstat (limited to 'avr/command.c')
-rw-r--r-- | avr/command.c | 13 |
1 files changed, 6 insertions, 7 deletions
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 <stdlib.h> #include <string.h> #include <ctype.h> -#include <stdio.h> #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 } |