vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit df56de7a24ae9ecf9fce461f064e14cbf4e3d215 parent 700dbef2f6c0f7b34237bd4e24af266d9d357116 Author: Marc André Tanner <mat@brain-dump.org> Date: Sat, 11 Jul 2015 21:41:58 +0200 vis: rename struct member to avoid conflict with standard library Closes #60 Diffstat:
| M | editor.h | | | 2 | +- |
| M | vis.c | | | 4 | ++-- |
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/editor.h b/editor.h @@ -189,7 +189,7 @@ enum Mark { struct File { Text *text; const char *name; - bool stdin; + bool is_stdin; struct stat stat; int refcount; Mark marks[MARK_LAST]; diff --git a/vis.c b/vis.c @@ -1709,7 +1709,7 @@ static bool cmd_write(Filerange *range, enum CmdOpt opt, const char *argv[]) { if (!argv[1]) argv[1] = file->name; if (!argv[1]) { - if (file->stdin) { + if (file->is_stdin) { if (strchr(argv[0], 'q')) { ssize_t written = text_range_write(text, range, STDOUT_FILENO); if (written == -1 || (size_t)written != text_range_size(range)) { @@ -2410,7 +2410,7 @@ int main(int argc, char *argv[]) { char buf[PIPE_BUF]; File *file = vis->win->file; Text *txt = file->text; - file->stdin = true; + file->is_stdin = true; while ((len = read(STDIN_FILENO, buf, sizeof buf)) > 0) text_insert(txt, text_size(txt), buf, len); if (len == -1)