diff options
author | wrmr | 2024-11-05 23:04:49 -0500 |
---|---|---|
committer | wrmr | 2024-11-05 23:04:49 -0500 |
commit | 9c932e49a7516570b6c1ff9863595d495e3a3212 (patch) | |
tree | cfd5205bd322da368699c47de59c16737ea7da24 /doc.c | |
parent | 9ee9d3c7dec6090316d21c2eed40992372ac3efa (diff) |
doc_add_link
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 3d1b378..3f63ba8 100644 --- a/doc.c +++ b/doc.c @@ -54,6 +54,11 @@ void doc_add_textn(struct doc *d, const char *s, size_t n) { dl->len += n; } +unsigned short doc_add_link(struct doc *d, const char *url) { + buf_cat(&d->lnk, url, strlen(url) + 1); + return d->linkc++; +} + /* line navigation */ struct doc_line *doc_line_at(struct doc *d, size_t ofs) { |