aboutsummaryrefslogtreecommitdiff
path: root/text-util.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-03-30 13:15:17 +0200
committerMarc André Tanner <mat@brain-dump.org>2016-03-30 14:03:12 +0200
commiteb7187acd903a8d1b4ed76d1ffe8572ddb078eac (patch)
tree17aed3916c05cc0b41fe0126899dd5a7bd6cf8ef /text-util.h
parent1cd15a982a47cf9c7a2beade17987f8303df85bf (diff)
downloadvis-eb7187acd903a8d1b4ed76d1ffe8572ddb078eac.tar.gz
vis-eb7187acd903a8d1b4ed76d1ffe8572ddb078eac.tar.xz
text-util: constify text_range_* functions
Diffstat (limited to 'text-util.h')
-rw-r--r--text-util.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/text-util.h b/text-util.h
index 9bfa705..a4d31b1 100644
--- a/text-util.h
+++ b/text-util.h
@@ -6,21 +6,21 @@
#include "text.h"
/* test whether the given range is valid (start <= end) */
-bool text_range_valid(Filerange*);
+bool text_range_valid(const Filerange*);
/* get the size of the range (end-start) or zero if invalid */
-size_t text_range_size(Filerange*);
+size_t text_range_size(const Filerange*);
/* create an empty / invalid range of size zero */
Filerange text_range_empty(void);
/* merge two ranges into a new one which contains both of them */
-Filerange text_range_union(Filerange*, Filerange*);
+Filerange text_range_union(const Filerange*, const Filerange*);
/* create new range [min(a,b), max(a,b)] */
Filerange text_range_new(size_t a, size_t b);
/* test whether two ranges are equal */
-bool text_range_equal(Filerange*, Filerange*);
+bool text_range_equal(const Filerange*, const Filerange*);
/* test whether two ranges overlap */
-bool text_range_overlap(Filerange*, Filerange*);
+bool text_range_overlap(const Filerange*, const Filerange*);
/* test whether a given position is within a certain range */
-bool text_range_contains(Filerange*, size_t pos);
+bool text_range_contains(const Filerange*, size_t pos);
/* count the number of graphemes in data */
int text_char_count(const char *data, size_t len);