blob: 9e066da7aa2d4426f5886b21358c2520b9703b85 [file] [log] [blame]
Wedson Almeida Filhofdf4afc2018-07-19 15:45:21 +01001#ifndef _MEMITER_H
2#define _MEMITER_H
3
4#include <stdbool.h>
5#include <stddef.h>
6#include <stdint.h>
7
8struct memiter {
9 const char *next;
10 const char *limit;
11};
12
13void memiter_init(struct memiter *it, const void *data, size_t size);
14bool memiter_parse_uint(struct memiter *it, uint64_t *value);
15bool memiter_parse_str(struct memiter *it, struct memiter *str);
16bool memiter_iseq(const struct memiter *it, const char *str);
Wedson Almeida Filho9ee60e92018-07-23 18:56:56 +010017bool memiter_advance(struct memiter *it, size_t v);
Wedson Almeida Filhofdf4afc2018-07-19 15:45:21 +010018
19#endif /* _MEMITER_H */