some fixes

This commit is contained in:
2021-11-23 01:14:35 +01:00
parent b7443ca9d4
commit b09bbc4afa
8 changed files with 116 additions and 73 deletions
+8 -1
View File
@@ -15,15 +15,22 @@ typedef bool (*fh_input_refill_t)(struct fh_thread_s *fh, struct fh_input_spec_s
/** Spec free func */
typedef void (*fh_input_free_t)(void *spec);
typedef void (*fh_input_start_t)(struct fh_thread_s *fh, struct fh_input_spec_s *spec);
typedef void (*fh_input_pushpop_t)(struct fh_thread_s *fh, struct fh_input_spec_s *spec);
struct fh_input_spec_s {
struct fh_input_spec_s *previous;
fh_input_refill_t refill_input_buffer;
fh_input_start_t start;
fh_input_free_t free_self;
fh_input_pushpop_t push_prepare;
fh_input_pushpop_t pop_restore;
uint32_t linenum;
char *cwd; // CWD of the input, used for relative includes. malloc'd (strdup)
// saved values, filled when pushing
char saved_buffer[INPUT_BUFFER_SIZE];
uint32_t saved_inputaddr;
uint32_t saved_inputptr;
uint32_t saved_inputlen;
uint32_t saved_execptr;
+2
View File
@@ -193,6 +193,8 @@ struct fh_thread_s {
/** Pictured numeric output buffer write cursor (used for prepend) */
uint32_t pictnumptr;
/** Start addr of the input string (SOURCE) */
uint32_t inputaddr;
/** Input buffer parse position */
uint32_t inputptr;
/** Input buffer total content size */