summaryrefslogtreecommitdiff
path: root/src/dged/text.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/dged/text.h')
-rw-r--r--src/dged/text.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/dged/text.h b/src/dged/text.h
index ec14650..108ded8 100644
--- a/src/dged/text.h
+++ b/src/dged/text.h
@@ -10,6 +10,11 @@
struct text;
+enum line_endings {
+ LineEnding_LF,
+ LineEnding_CRLF,
+};
+
struct text_chunk {
uint8_t *text;
uint32_t nbytes;
@@ -34,6 +39,8 @@ void text_append(struct text *text, uint8_t *bytes, uint32_t nbytes,
void text_delete(struct text *text, uint32_t start_line, uint32_t start_offset,
uint32_t end_line, uint32_t end_offset);
+enum line_endings text_get_line_ending(const struct text *);
+
uint32_t text_num_lines(const struct text *text);
uint32_t text_line_size(const struct text *text, uint32_t lineidx);
struct utf8_codepoint_iterator