From 3780f207f924f14734cb839fd015bd883fe52ff1 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Thu, 30 Jan 2025 21:02:42 -0800 Subject: restructure project --- src/include/bsv.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/include/bsv.h (limited to 'src/include/bsv.h') 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 -- cgit