From 9faead33740e7b5b847478518fd3a270a2aa5c2a Mon Sep 17 00:00:00 2001 From: wrmr Date: Sun, 3 Nov 2024 12:49:38 -0500 Subject: some refactoring to disconnect doc_type from networking --- nav.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'nav.c') diff --git a/nav.c b/nav.c index 59fdca6..8f1d699 100644 --- a/nav.c +++ b/nav.c @@ -98,17 +98,18 @@ void nav_redraw(struct nav_state *ns) { /* network */ int nav_to(struct nav_state *ns, const char *url) { + enum doc_type doct; struct addr adr; buf_t buf; if (net_addr(url, &adr, ns->prot_default)) { return -1; } ns->prot_default = adr.prot; - if (net_fetch(&adr, &buf)) { + if (net_fetch(&adr, &buf, &doct)) { return -1; } struct doc d; - if (parse_doc(adr.type, &d, &buf)) { + if (parse_doc(doct, &d, &buf)) { buf_free(&buf); return -1; } -- cgit 1.4.1-2-gfad0