]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - avr/cli.c
z80_toggle_reset(), z80_toggle_busreq()
[z180-stamp.git] / avr / cli.c
index 8a62bc054a34c19bc9db604c838b475868f1a4c9..7c452511d0642b732c94befd0c0f61a1cbaf11d8 100644 (file)
--- a/avr/cli.c
+++ b/avr/cli.c
  */
 
 #include "cli.h"
-#include "common.h"
-
-#include <string.h>
+#include "command.h"
 #include <ctype.h>
-#include <stdlib.h>
-#include <stdio.h>
 
 #include "config.h"
-#include "command.h"
 #include "debug.h"
 #include "env.h"
 #include "cli_readline.h"
@@ -314,6 +309,10 @@ static int cli_run_command(const char *cmd, uint_fast8_t flag)
                } else {
                        str = sep;                      /* no more commands for next pass */
                }
+               while (isblank(*token))
+                       ++token;
+               if (*token == '\0')             /* empty (comment only) */
+                       continue;
                debug_parser("token: \"%s\"\n", token);
 
                /* find macros in this token and replace them */