diff options
author | wrmr | 2024-11-05 23:56:09 -0500 |
---|---|---|
committer | wrmr | 2024-11-05 23:56:09 -0500 |
commit | 837a9067c0ef2e0b3affbf7035788cd0e80ce7ba (patch) | |
tree | 683b41aed4496d623490419dcbdc00ca926da9eb /doc.c | |
parent | 9c932e49a7516570b6c1ff9863595d495e3a3212 (diff) |
add rudimentary gophermap parsing
Diffstat (limited to 'doc.c')
-rw-r--r-- | doc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/doc.c b/doc.c index 3f63ba8..89ff756 100644 --- a/doc.c +++ b/doc.c @@ -59,6 +59,11 @@ unsigned short doc_add_link(struct doc *d, const char *url) { return d->linkc++; } +void doc_set_link(struct doc *d, unsigned short lnk) { + struct doc_line *l = doc_line_at(d, d->latest); + l->link = lnk; +} + /* line navigation */ struct doc_line *doc_line_at(struct doc *d, size_t ofs) { |