vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 18caf9c7e161e484ed3ab8845d2a78138d435fdc parent d6c05ed7beee1cd8b02210af0218c00fa7d7e1e1 Author: Marc André Tanner <mat@brain-dump.org> Date: Wed, 30 Sep 2020 10:39:12 +0200 text: mark text_mark_get argument as const Diffstat:
| M | text.c | | | 2 | +- |
| M | text.h | | | 2 | +- |
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/text.c b/text.c @@ -1750,7 +1750,7 @@ Mark text_mark_set(Text *txt, size_t pos) { return (Mark)(loc.piece->data + loc.off); } -size_t text_mark_get(Text *txt, Mark mark) { +size_t text_mark_get(const Text *txt, Mark mark) { size_t cur = 0; if (mark == EMARK) diff --git a/text.h b/text.h @@ -300,7 +300,7 @@ Mark text_mark_set(Text*, size_t pos); * @param mark The mark to look up. * @return The byte position or ``EPOS`` for an invalid mark. */ -size_t text_mark_get(Text*, Mark); +size_t text_mark_get(const Text*, Mark); /** * @} * @defgroup save