]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - avr/command.c
Version 0.6.8.1
[z180-stamp.git] / avr / command.c
index 5499b9d08716d79a06268936bdddf927a00e7a19..cd2ee39c81be86cc8035e4a738c4697db7174ec8 100644 (file)
  *  Command Processor Table
  */
 
+#include "command.h"
 #include "common.h"
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
+#include <setjmp.h>
 
 #include "config.h"
 #include "print-utils.h"
 #include "con-utils.h"
 #include "env.h"
 #include "debug.h"
-#include "command.h"
+
+
+jmp_buf cmd_jbuf;
 
 
 static void print_usage_line(const FLASH char *name, int width,
@@ -521,6 +525,9 @@ command_ret_t cmd_process(int flag, int argc, char * const argv[],
        }
 #endif
 
+       if (setjmp(cmd_jbuf) != 0)
+               return CMD_RET_FAILURE;
+
        /* If OK so far, then do the command */
        if (!rc) {
                rc = cmd_call(cmdtp, flag, argc, argv);