aboutsummaryrefslogtreecommitdiff
path: root/text.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-02-25 19:57:02 +0100
committerMarc André Tanner <mat@brain-dump.org>2017-02-25 19:57:02 +0100
commit28a9ce8ad8a18eaabca7cc0674624d32318fb3d8 (patch)
tree63f873557e193194079531626d809e0f62b47677 /text.h
parent563c2abacfa1ae0af3323f98fb753c9c91f927f5 (diff)
downloadvis-28a9ce8ad8a18eaabca7cc0674624d32318fb3d8.tar.gz
vis-28a9ce8ad8a18eaabca7cc0674624d32318fb3d8.tar.xz
text: add iterator accessor function which translates \r\n to \n
Diffstat (limited to 'text.h')
-rw-r--r--text.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/text.h b/text.h
index b927e3f..8559b36 100644
--- a/text.h
+++ b/text.h
@@ -86,6 +86,9 @@ bool text_iterator_prev(Iterator*);
/* get byte at current iterator position, if this is at EOF a NUL
* byte (which is not actually part of the file) is read. */
bool text_iterator_byte_get(Iterator*, char *b);
+/* same as byte get, but if a sequence of '\r\n' is read at the
+ * iterator position, *c is set to \n instead of \r. */
+bool text_iterator_char_get(Iterator*, char *c);
/* advance iterator by one byte and get byte at new position. */
bool text_iterator_byte_prev(Iterator*, char *b);
/* if the new position is at EOF a NUL byte (which is not actually