vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit d6c05ed7beee1cd8b02210af0218c00fa7d7e1e1
parent ed5227b557a0fc600cadf8bd8786a880febc630f
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Wed, 30 Sep 2020 10:37:05 +0200

text: mark text_iterator_byte_get argument as const

Diffstat:
Mtext.c | 2+-
Mtext.h | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/text.c b/text.c @@ -1409,7 +1409,7 @@ Iterator text_iterator_get(const Text *txt, size_t pos) { return it; } -bool text_iterator_byte_get(Iterator *it, char *b) { +bool text_iterator_byte_get(const Iterator *it, char *b) { if (text_iterator_valid(it)) { Text *txt = text_iterator_text(it); if (it->start <= it->text && it->text < it->end) { diff --git a/text.h b/text.h @@ -261,7 +261,7 @@ bool text_iterator_prev(Iterator*); * @defgroup iterator_byte * @{ */ -bool text_iterator_byte_get(Iterator*, char *b); +bool text_iterator_byte_get(const Iterator*, char *b); bool text_iterator_byte_prev(Iterator*, char *b); bool text_iterator_byte_next(Iterator*, char *b); bool text_iterator_byte_find_prev(Iterator*, char b);