Move ao_match_word from ao_ignite.c to ao_cmd.c
authorKeith Packard <keithp@keithp.com>
Fri, 6 Nov 2009 05:43:21 +0000 (21:43 -0800)
committerKeith Packard <keithp@keithp.com>
Fri, 6 Nov 2009 05:43:21 +0000 (21:43 -0800)
This is a generally useful command line utility.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/ao.h
src/ao_cmd.c
src/ao_ignite.c

index bc9afcc32ca38430986dce42caefb85c64813f31..508ed37a47c65027ee9705781857956c7470c94e 100644 (file)
--- a/src/ao.h
+++ b/src/ao.h
@@ -350,6 +350,9 @@ ao_cmd_hex(void);
 void
 ao_cmd_decimal(void);
 
+uint8_t
+ao_match_word(__code char *word);
+
 struct ao_cmds {
        char            cmd;
        void            (*func)(void);
index e3f85bc9090e8f64e0ad3b48bcea7d322e2296e6..81a527085faf5b099fa89f177d871b16a1c235ea 100644 (file)
@@ -171,6 +171,20 @@ ao_cmd_decimal(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)
 {
index 8206e342ef2f5c119a41ddb1420d1531f7d7522e..981cf0ce1299413a8f520c79b127aa424500a0b6 100644 (file)
@@ -121,20 +121,6 @@ ao_igniter(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)
 {