#include <stdio.h>
-struct ec_strvec {
- size_t len;
- char **vec;
-};
-
-struct ec_strvec *ec_strvec_new(void);
+struct ec_strvec *ec_strvec(void);
int ec_strvec_add(struct ec_strvec *strvec, const char *s);
struct ec_strvec *ec_strvec_dup(const struct ec_strvec *strvec);
-struct ec_strvec *ec_strvec_ndup(const struct ec_strvec *strvec, size_t len);
+struct ec_strvec *ec_strvec_ndup(const struct ec_strvec *strvec,
+ size_t off, size_t len);
void ec_strvec_free(struct ec_strvec *strvec);
size_t ec_strvec_len(const struct ec_strvec *strvec);
char *ec_strvec_val(const struct ec_strvec *strvec, size_t idx);
-int ec_strvec_slice(struct ec_strvec *strvec, const struct ec_strvec *from,
- size_t off);
-void ec_strvec_dump(const struct ec_strvec *strvec, FILE *out);
+void ec_strvec_dump(FILE *out, const struct ec_strvec *strvec);
#endif