diff options
author | Preston Pan <ret2pop@gmail.com> | 2025-01-30 21:02:42 -0800 |
---|---|---|
committer | Preston Pan <ret2pop@gmail.com> | 2025-01-30 21:02:42 -0800 |
commit | 3780f207f924f14734cb839fd015bd883fe52ff1 (patch) | |
tree | de13568dbf97ffe477943854bcb3ea6001b46cf8 /src/include/bsv.h | |
parent | ef9ab1fd141f4057d41f2d6ed8ab8d67c44894d5 (diff) |
Diffstat (limited to 'src/include/bsv.h')
-rw-r--r-- | src/include/bsv.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/include/bsv.h b/src/include/bsv.h new file mode 100644 index 0000000..dd8206d --- /dev/null +++ b/src/include/bsv.h @@ -0,0 +1,21 @@ +#ifndef BSV_H +#define BSV_H + +#include "better_string.h" + +/*! @brief State for byte delimited values */ +typedef struct BSV_STRUCT { + /*! @brief the source bsv separated list */ + char *source; + /*! @brief current index */ + unsigned int i; + char c; + char delim; +} bsv_t; + +/*! @brief Initializes memory for new bsv struct */ +bsv_t *init_bsv(char *source, char delim); + +/*! @brief get the next byte delimited token */ +string_t *bsv_next(bsv_t *bsv); +#endif |