]>
diplodocus.org Git - nmh/blob - sbr/read_yes_or_no_if_tty.c
3d7c110427a1efbaea905202c8724f7d11c1d155
2 * read_yes_or_no_if_tty.c -- get a yes/no answer from the user
4 * This code is Copyright (c) 2002, by the authors of nmh. See the
5 * COPYRIGHT file in the root directory of the nmh distribution for
6 * complete copyright information.
13 read_yes_or_no_if_tty (const char *prompt
)
15 static int interactive
= -1;
18 interactive
= isatty (fileno (stdin
)) ? 1 : 0;
20 return (interactive
? read_switch (prompt
, anoyes
) : 1);