X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/0a032eea07f6d77ac6ea4d5a39c9491c34358058..ec173fd2c:/sbr/read_yes_or_no_if_tty.c diff --git a/sbr/read_yes_or_no_if_tty.c b/sbr/read_yes_or_no_if_tty.c index 3d7c1104..03a3c0b5 100644 --- a/sbr/read_yes_or_no_if_tty.c +++ b/sbr/read_yes_or_no_if_tty.c @@ -1,12 +1,13 @@ -/* - * read_yes_or_no_if_tty.c -- get a yes/no answer from the user +/* read_yes_or_no_if_tty.c -- get a yes/no answer from the user * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for * complete copyright information. */ -#include +#include "h/mh.h" +#include "read_yes_or_no_if_tty.h" +#include "read_switch.h" int @@ -15,7 +16,7 @@ read_yes_or_no_if_tty (const char *prompt) static int interactive = -1; if (interactive < 0) - interactive = isatty (fileno (stdin)) ? 1 : 0; + interactive = isatty (fileno (stdin)); - return (interactive ? read_switch (prompt, anoyes) : 1); + return interactive ? read_switch(prompt, anoyes) : 1; }