diff options
author | wrmr | 2024-11-09 02:04:33 -0500 |
---|---|---|
committer | wrmr | 2024-11-09 02:04:33 -0500 |
commit | 38987f3f5a3919ac81ba419e05ac8610c269faff (patch) | |
tree | dc76c691f0e7d8385224ede708b9390b50b68dff /parse.c | |
parent | 12d5d0df5c4b958bbb5cc339a9e556c50136a974 (diff) |
rename buf_t to str_t, and consolidate str.c/h with strv.c/h
Diffstat (limited to 'parse.c')
-rw-r--r-- | parse.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/parse.c b/parse.c index 40f7a25..afa8008 100644 --- a/parse.c +++ b/parse.c @@ -2,7 +2,7 @@ #include <string.h> #include "parse.h" -#include "strv.h" +#include "str.h" #include "err.h" int isurlch(char c) { @@ -23,7 +23,7 @@ void parse_plain_url(struct doc *d, struct doc_line *l, size_t i) { l->link = doc_add_link(d, url); } -int parse_plain(struct doc *d, const buf_t *b) { +int parse_plain(struct doc *d, const str_t *b) { doc_init(d); strv_t ln, buf = (strv_t) { b->buf, b->sz }; while (strv_split(&buf, '\n', &ln)) { @@ -80,7 +80,7 @@ int parse_gophermap_line(struct doc *d, strv_t ln) { return 0; } -int parse_gophermap(struct doc *d, const buf_t *b) { +int parse_gophermap(struct doc *d, const str_t *b) { doc_init(d); strv_t ln, buf = { b->buf, b->sz }; while (strv_split(&buf, '\n', &ln)) { @@ -90,7 +90,7 @@ int parse_gophermap(struct doc *d, const buf_t *b) { return 0; } -int parse_doc(enum doc_type type, struct doc *d, const buf_t *b) { +int parse_doc(enum doc_type type, struct doc *d, const str_t *b) { switch (type) { case DOC_PLAIN: return parse_plain(d, b); |