Revision 12455,
295 bytes
checked in by danw, 26 years ago
(diff) |
This commit was generated by cvs2svn to compensate for changes in r12454,
which included commits to RCS files with non-trunk default branches.
|
Line | |
---|
1 | |
---|
2 | /* |
---|
3 | * getanswer.c -- get a yes/no answer from the user |
---|
4 | */ |
---|
5 | |
---|
6 | #include <h/mh.h> |
---|
7 | #include <stdio.h> |
---|
8 | |
---|
9 | |
---|
10 | int |
---|
11 | getanswer (char *prompt) |
---|
12 | { |
---|
13 | static int interactive = -1; |
---|
14 | |
---|
15 | if (interactive < 0) |
---|
16 | interactive = isatty (fileno (stdin)) ? 1 : 0; |
---|
17 | |
---|
18 | return (interactive ? gans (prompt, anoyes) : 1); |
---|
19 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.