Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
move the stack to command_state_t, remove some global variables
- Loading branch information
Showing
with
60 additions
and 40 deletions.
- +2 −2 simulator/Makefile
- +1 −0 src/Makefile
- +1 −0 src/config.mk
- +9 −0 src/state.c
- +34 −1 src/state.h
- +11 −35 src/teletype.c
- +0 −1 src/teletype.h
- +2 −1 tests/Makefile
| @@ -0,0 +1,9 @@ | ||
| #include "state.h" | ||
|
|
||
| void cs_init(command_state_t *cs) { | ||
| cs->stack.top = 0; | ||
| } | ||
|
|
||
| int16_t cs_stack_size(command_state_t *cs) { | ||
| return cs->stack.top; | ||
| } |