diff options
Diffstat (limited to 'src/fspec/lexer.h')
-rw-r--r-- | src/fspec/lexer.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/fspec/lexer.h b/src/fspec/lexer.h index 7b60e6b..ef6e059 100644 --- a/src/fspec/lexer.h +++ b/src/fspec/lexer.h @@ -2,14 +2,22 @@ #include <fspec/memory.h> +#include <stdbool.h> + +enum fspec_lexer_section { + FSPEC_SECTION_DATA, + FSPEC_SECTION_CODE, +}; + struct fspec_lexer; struct fspec_lexer { struct { - size_t (*read)(struct fspec_lexer *lexer, void *ptr, const size_t size, const size_t nmemb); + size_t (*read)(struct fspec_lexer *lexer, void *input, const size_t size, const size_t nmemb); + size_t (*write)(struct fspec_lexer *lexer, const enum fspec_lexer_section section, const void *output, const size_t size, const size_t nmemb); } ops; struct { - struct fspec_mem input, output; + struct fspec_mem input; } mem; }; |