From a7bde561b1edb2501fac05b09e6468464cd79d3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Tue, 22 Jul 2014 17:50:39 +0200 Subject: API cleanup Add editor_{insert,replace}_raw and const modifiers where appropriate. --- editor.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'editor.h') 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*); -- cgit v1.2.3