1: /* $Header$ */
2:
3: /*
4: * Author: Peter J. Nicklin
5: */
6:
7: /*
8: * yes() returns 1 if the user replies with a word starting with `y',
9: * otherwise zero. yes() eats up the rest of the line.
10: */
11: #include <stdio.h>
12:
13: yes()
14: {
15: register int c; /* current character */
16: int status = 0; /* return status */
17:
18: while ((c = getchar()) == ' ' || c == '\t')
19: continue;
20: if (c == 'y')
21: status = 1;
22: while (c != '\n')
23: c = getchar();
24: return(status);
25: }
Defined functions
yes
defined in line
13;
never used