diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2014-09-13 22:25:06 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2014-09-13 22:29:36 +0200 |
| commit | c17ca10e11db30f4b4924b69dbf3b1693025d4dc (patch) | |
| tree | db8f9ed1b95d895e111f68181ab8433b6349639b /text.h | |
| parent | c94579526c082e75b9ee8ec2fc189540884ac039 (diff) | |
| download | vis-c17ca10e11db30f4b4924b69dbf3b1693025d4dc.tar.gz vis-c17ca10e11db30f4b4924b69dbf3b1693025d4dc.tar.xz | |
Introduce and use EPOS instead of (size_t)-1
Diffstat (limited to 'text.h')
| -rw-r--r-- | text.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -4,6 +4,8 @@ #include <stdbool.h> #include <stddef.h> +#define EPOS ((size_t)-1) /* invalid position */ + typedef size_t Filepos; typedef struct { @@ -36,7 +38,7 @@ bool text_insert_raw(Text*, size_t pos, const char *data, size_t len); bool text_delete(Text*, size_t pos, size_t len); void text_snapshot(Text*); /* undo/redos to the last snapshoted state. returns the position where - * the change occured or (size_t)-1 if nothing could be undo/redo. */ + * the change occured or EPOS if nothing could be undo/redo. */ size_t text_undo(Text*); size_t text_redo(Text*); |
