From 38987f3f5a3919ac81ba419e05ac8610c269faff Mon Sep 17 00:00:00 2001 From: wrmr Date: Sat, 9 Nov 2024 02:04:33 -0500 Subject: rename buf_t to str_t, and consolidate str.c/h with strv.c/h --- parse.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'parse.c') diff --git a/parse.c b/parse.c index 40f7a25..afa8008 100644 --- a/parse.c +++ b/parse.c @@ -2,7 +2,7 @@ #include #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); -- cgit 1.4.1-2-gfad0