aboutsummaryrefslogtreecommitdiff
path: root/src/include/bsv.h
blob: dd8206d2397c60be16f14b71fb0fff858682f201 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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