aboutsummaryrefslogtreecommitdiff
path: root/text.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-02-21 10:05:34 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-02-21 10:05:34 +0100
commitb8938fe1d099d1b5b6ceecda6668b879e6a49298 (patch)
treebb539171afa6d9bb90cad92fc4822db0f0cc9ce4 /text.h
parentb56c629d8200b891bcf6822cfa4425ccc9849567 (diff)
downloadvis-b8938fe1d099d1b5b6ceecda6668b879e6a49298.tar.gz
vis-b8938fe1d099d1b5b6ceecda6668b879e6a49298.tar.xz
Cleanup new line insertion code
Diffstat (limited to 'text.h')
-rw-r--r--text.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/text.h b/text.h
index 90da900..db71173 100644
--- a/text.h
+++ b/text.h
@@ -41,7 +41,7 @@ bool text_appendf(Text*, const char *format, ...);
bool text_printf(Text*, size_t pos, const char *format, ...);
bool text_vprintf(Text*, size_t pos, const char *format, va_list ap);
/* inserts a line ending character (depending on file type) */
-bool text_insert_newline(Text*, size_t pos);
+size_t text_insert_newline(Text*, size_t pos);
/* insert `len' bytes starting from `data' at `pos' which has to be
* in the interval [0, text_size(txt)] */
bool text_insert(Text*, size_t pos, const char *data, size_t len);
@@ -125,6 +125,7 @@ enum TextNewLine {
};
enum TextNewLine text_newline_type(Text*);
+const char *text_newline_char(Text*);
/* save the whole text to the given `filename'. Return true if succesful.
* In which case an implicit snapshot is taken. The save might associate a