|
|
|
@ -516,7 +516,7 @@ static enum fh_error w_abort(struct fh_thread_s *fh, const struct fh_word_s *w) |
|
|
|
|
|
|
|
|
|
fh->data_stack_top = 0; |
|
|
|
|
fh->return_stack_top = 0; |
|
|
|
|
fh->state = FH_STATE_QUIT; |
|
|
|
|
fh_setstate(fh, FH_STATE_QUIT, 0); |
|
|
|
|
|
|
|
|
|
return FH_OK; |
|
|
|
|
} |
|
|
|
@ -526,7 +526,16 @@ static enum fh_error w_quit(struct fh_thread_s *fh, const struct fh_word_s *w) |
|
|
|
|
(void) w; |
|
|
|
|
|
|
|
|
|
fh->return_stack_top = 0; |
|
|
|
|
fh->state = FH_STATE_QUIT; |
|
|
|
|
fh_setstate(fh, FH_STATE_QUIT, 0); |
|
|
|
|
|
|
|
|
|
return FH_OK; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static enum fh_error w_exit(struct fh_thread_s *fh, const struct fh_word_s *w) |
|
|
|
|
{ |
|
|
|
|
(void) w; |
|
|
|
|
|
|
|
|
|
fh_setsubstate(fh, FH_SUBSTATE_EXIT); |
|
|
|
|
|
|
|
|
|
return FH_OK; |
|
|
|
|
} |
|
|
|
@ -709,8 +718,9 @@ enum fh_error register_builtin_words(struct fh_thread_s *fh) |
|
|
|
|
{"space", w_space, 0, 0}, |
|
|
|
|
{"dump", w_dump, 0, 0}, |
|
|
|
|
/* Control flow */ |
|
|
|
|
{"abort", w_abort, 0, 0}, |
|
|
|
|
{"abort", w_abort, 0, 0}, |
|
|
|
|
{"quit", w_quit, 0, 0}, |
|
|
|
|
{"exit", w_exit, 0, 0}, |
|
|
|
|
/* Syntax */ |
|
|
|
|
{":", w_colon, 0, 0}, |
|
|
|
|
{";", w_semicolon, 1, 0}, |
|
|
|
|