(Note that in a future release we might make this stricter and insist
on exactly 'y' or 'n'.)
Version 2.02.89 -
==================================
+ Move y/n prompts to stderr and repeat if response has both 'n' and 'y'.
Replace the unit testing framework with CUnit (--enable-testing).
Fix dmeventd snapshot monitoring when multiple extensions were involved.
Don't ignore configure --mandir and --infodir.
do {
if (c == '\n' || !c) {
va_start(ap, prompt);
- vprintf(prompt, ap);
+ vfprintf(stderr, prompt, ap);
va_end(ap);
- fflush(stdout);
+ fflush(stderr);
+ ret = 0;
}
if ((c = getchar()) == EOF) {
}
c = tolower(c);
- if ((c == 'y') || (c == 'n'))
- ret = c;
- } while (!ret || c != '\n');
+ if ((c == 'y') || (c == 'n')) {
+ /* If both 'y' and 'n' given, begin again. */
+ if (ret && c != ret)
+ ret = -1;
+ else
+ ret = c;
+ }
+ } while (ret < 1 || c != '\n');
sigint_restore();