diff options
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) { |