aboutsummaryrefslogtreecommitdiffstats
path: root/forthmachine.h
diff options
context:
space:
mode:
authordan <[email protected]>2023-06-03 14:41:14 -0400
committerdan <[email protected]>2023-06-03 14:41:14 -0400
commit48c02f4fccd13cf329594988a19a4edd1fce4774 (patch)
treea92d6af027aa5b9d3368801b770179cc83a928f3 /forthmachine.h
parentf130b76fabb440b02c418a537074ec80489a9480 (diff)
downloadforth-48c02f4fccd13cf329594988a19a4edd1fce4774.tar.gz
forth-48c02f4fccd13cf329594988a19a4edd1fce4774.tar.bz2
forth-48c02f4fccd13cf329594988a19a4edd1fce4774.zip
feat: forthmachine and stack errors handled with error handlers, not just by printing
Diffstat (limited to 'forthmachine.h')
-rw-r--r--forthmachine.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/forthmachine.h b/forthmachine.h
index de59fc5..a3a4522 100644
--- a/forthmachine.h
+++ b/forthmachine.h
@@ -3,6 +3,7 @@
#include <stdio.h>
#include <stdbool.h>
#include "stack.h"
+#include "errorhandler.h"
#define OPTABLE_MAX_SIZE 1024
@@ -69,11 +70,12 @@ struct forthmachine {
optable* ot;
stack* s;
char* outputbuffer;
+ errorhandler errorhandler;
};
#define MAX_OUTPUT_BUFFER_SIZE 1024
-forthmachine* forthmachine_new();
+forthmachine* forthmachine_new(errorhandler errorhandler);
void forthmachine_eval(forthmachine* fm, int len, char* line);
#endif //OPTABLE_H