This is a generally useful command line utility.
Signed-off-by: Keith Packard <keithp@keithp.com>
void
ao_cmd_decimal(void);
+uint8_t
+ao_match_word(__code char *word);
+
struct ao_cmds {
char cmd;
void (*func)(void);
ao_cmd_status = r;
}
+uint8_t
+ao_match_word(__code char *word)
+{
+ while (*word) {
+ if (ao_cmd_lex_c != *word) {
+ ao_cmd_status = ao_cmd_syntax_error;
+ return 0;
+ }
+ word++;
+ ao_cmd_lex();
+ }
+ return 1;
+}
+
static void
eol(void)
{
}
}
-static uint8_t
-ao_match_word(__code char *word)
-{
- while (*word) {
- if (ao_cmd_lex_c != *word) {
- ao_cmd_status = ao_cmd_syntax_error;
- return 0;
- }
- word++;
- ao_cmd_lex();
- }
- return 1;
-}
-
void
ao_ignite_manual(void)
{