projects
/
mmh
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
hesiod and krb5 test fixes
[mmh]
/
sbr
/
getanswer.c
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
}