vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 2357605befdd6f64dac09a7d25fa6e10afbfed20 parent ddccad559d09ce36ad7b8d8cfd9ddb498334b33b Author: Marc André Tanner <mat@brain-dump.org> Date: Tue, 23 Dec 2014 17:26:22 +0100 Fix compiler warnings Diffstat:
| M | text.h | | | 10 | +++++----- |
| M | vis.c | | | 2 | +- |
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/text.h b/text.h @@ -21,11 +21,11 @@ typedef struct Text Text; typedef struct Piece Piece; typedef struct { - const char const *start; /* begin of piece's data */ - const char const *end; /* pointer to the first byte after valid data i.e. [start, end) */ - const char const *text; /* current position within piece: start <= text < end */ - const Piece const *piece; /* internal state do not touch! */ - size_t pos; /* global position in bytes from start of file */ + const char *start; /* begin of piece's data */ + const char *end; /* pointer to the first byte after valid data i.e. [start, end) */ + const char *text; /* current position within piece: start <= text < end */ + const Piece *piece; /* internal state do not touch! */ + size_t pos; /* global position in bytes from start of file */ } Iterator; #define text_iterate(txt, it, pos) \ diff --git a/vis.c b/vis.c @@ -1674,7 +1674,7 @@ static void setup() { char *term = getenv("TERM"); if (!term) term = DEFAULT_TERM; - if (!newterm(term, stderr, stdin) == ERR) + if (!newterm(term, stderr, stdin)) die("Can not initialize terminal\n"); start_color(); raw();