diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2015-07-06 21:49:19 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2015-07-06 21:49:19 +0200 |
| commit | 22d843e6719c025bf6d711bfdd3644e442ee8966 (patch) | |
| tree | 67a52cf274e92759696d99d1a1dd932e5e369394 /text.h | |
| parent | 071b5f3c94c4b157a153586b087229f9e6b465d3 (diff) | |
| download | vis-22d843e6719c025bf6d711bfdd3644e442ee8966.tar.gz vis-22d843e6719c025bf6d711bfdd3644e442ee8966.tar.xz | |
Warn when saving a file which has been changed outside the editor
Diffstat (limited to 'text.h')
| -rw-r--r-- | text.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -3,7 +3,9 @@ #include <stdbool.h> #include <time.h> +#include <unistd.h> #include <sys/types.h> +#include <sys/stat.h> #define EPOS ((size_t)-1) /* invalid position */ @@ -35,6 +37,8 @@ typedef struct { text_iterator_next(&it)) Text *text_load(const char *file); +/* file information at time of load or last save */ +struct stat text_stat(Text*); bool text_insert(Text*, size_t pos, const char *data, size_t len); bool text_delete(Text*, size_t pos, size_t len); void text_snapshot(Text*); |
