aboutsummaryrefslogtreecommitdiff
path: root/editor.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2014-07-22 17:50:39 +0200
committerMarc André Tanner <mat@brain-dump.org>2014-07-22 17:50:39 +0200
commita7bde561b1edb2501fac05b09e6468464cd79d3e (patch)
treebe8b5771249fa7e6dc05641632eef872ebf35559 /editor.h
parent88ad866d5f4162b0778f10d51422710ab5b87437 (diff)
downloadvis-a7bde561b1edb2501fac05b09e6468464cd79d3e.tar.gz
vis-a7bde561b1edb2501fac05b09e6468464cd79d3e.tar.xz
API cleanup
Add editor_{insert,replace}_raw and const modifiers where appropriate.
Diffstat (limited to 'editor.h')
-rw-r--r--editor.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/editor.h b/editor.h
index bde4da9..49de36b 100644
--- a/editor.h
+++ b/editor.h
@@ -12,9 +12,11 @@ typedef struct {
typedef bool (*iterator_callback_t)(void *, size_t pos, const char *content, size_t len);
Editor *editor_load(const char *file);
-bool editor_insert(Editor*, size_t pos, char *c);
+bool editor_insert(Editor*, size_t pos, const char *data);
+bool editor_insert_raw(Editor*, size_t pos, const char *data, size_t len);
bool editor_delete(Editor*, size_t pos, size_t len);
-bool editor_replace(Editor*, size_t pos, char *c);
+bool editor_replace(Editor*, size_t pos, const char *data);
+bool editor_replace_raw(Editor*, size_t pos, const char *data, size_t len);
void editor_snapshot(Editor*);
bool editor_undo(Editor*);
bool editor_redo(Editor*);