#include #include "lx.h" #include "internal.h" void lx_strlist_free(LX_STRLIST *sl) { free(sl->lens); free(sl->data); free(sl->alldata); free(sl); } int lx_strlist_entries(const LX_STRLIST *sl) { return(sl->len); } int lx_strlist_entry_len(const LX_STRLIST *sl, int x) { if ((x < 0) || (x >= sl->len)) return(-1); return(sl->lens[x]); } const void *lx_strlist_entry_data(const LX_STRLIST *sl, int x) { if ((x < 0) || (x >= sl->len)) return(0); return(sl->data[x]); }