summaryrefslogtreecommitdiff
path: root/avr/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'avr/command.c')
-rw-r--r--avr/command.c13
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
}