view sbr/getanswer.c @ 1:848621fd0092 kono mh-6_8_4_JP3_05

MH pre UTF8
author kono
date Mon, 18 Apr 2005 23:46:02 +0900
parents bce86c4163a3
children
line wrap: on
line source

/* getanswer.c - get a yes/no answer from the user */

#include "../h/mh.h"
#include <stdio.h>


int     getanswer (prompt)
register char   *prompt;
{
    static int  interactive = NOTOK;

    if (interactive < OK)
	interactive = isatty (fileno (stdin)) ? DONE : OK;

    return (interactive ? gans (prompt, anoyes) : DONE);
}