Description for new cstr wrapper is done.

master^2 v1.3.3
Alexander Vdolainen 5 years ago
parent d17149579d
commit 1e6a689c28

@ -567,12 +567,29 @@ typedef struct sexp_iowrap {
size_t cnt;
} sexp_iowrap_t;
/* TODO: doxygen? more doxygen */
/**
* \ingroup IO
* This structure is a wrapper around a the parsing infrastructure (continuation
* and a buffer) required to parse off of it. This is used so that routines can
* hide the loops and details required to accumulate up data read off of the buffer.
*/
typedef struct sexp_cstrwrap {
/**
* Continuation used to parse off of the given buffer
*/
pcont_t *cc;
/**
* A pointer to the cstring data to parse
*/
const char *seval;
/**
* different counters used to have a deal with source and buffer
*/
size_t rl, cnt;
size_t sln;
/**
* Temproary buffer used to parse
*/
char buf[CSTRBUFSIZ];
} sexp_cstrwrap_t;
@ -742,8 +759,18 @@ extern "C" {
*/
sexp_t *read_one_sexp(sexp_iowrap_t *iow);
/**
* \ingroup IO
* create an wrapper structure around a c string buffer. A NULL return
* value indicates some problem occurred allocating the wrapper, so the
* user should check the value of sexp_errno for further information.
*/
sexp_cstrwrap_t *init_cstrwrap(const char *);
/**
* \ingroup IO
* destroy a wrapper structure.
*/
void destroy_cstrwrap(sexp_cstrwrap_t *);
sexp_t *get_one_sexp(sexp_cstrwrap_t *);

Loading…
Cancel
Save