From 2352079d0c54955f69b9070fc022c5f099906805 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Sun, 13 Jun 2021 18:45:41 +0200 Subject: rework command group logic to work linear, replace return with EXIT_* --- src/common.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/common.h') diff --git a/src/common.h b/src/common.h index 21bd727..d4cce1d 100644 --- a/src/common.h +++ b/src/common.h @@ -12,6 +12,8 @@ extern uint8_t no_net; +typedef int (*func_t)(int, char**); + struct MemoryStruct { uint8_t* memory; size_t size; @@ -19,7 +21,7 @@ struct MemoryStruct { struct Command { char* name; - int (*func)(int, char**); + func_t func; char* description; }; -- cgit v1.2.3