From bb6cfc65c9e86d85c74d5bcce6c32a8937e611f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sat, 11 Jul 2015 21:41:58 +0200 Subject: vis: rename struct member to avoid conflict with standard library Closes #60 --- editor.h | 2 +- vis.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/editor.h b/editor.h index edfa210..a2ab3f5 100644 --- 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 index 275d48e..8e51bce 100644 --- 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) -- cgit v1.2.3