aboutsummaryrefslogtreecommitdiff
path: root/src/include/bsv.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/bsv.h')
-rw-r--r--src/include/bsv.h21
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