File:  [MW Coherent from dump] / coherent / a / usr / src / misc / yn.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:34 2019 UTC (7 years ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent

/*
 * ask a question yes or no.
 */
#include <stdio.h>
yn(question)
char * question;
{
	char reply[80];

	for(;;) {
		printf("%r <y/n> ", &question);
		fflush(stdout);
		gets(reply);
		switch(*reply) {
		case 'Y':
		case 'y':
			return(1);
		case 'n':
		case 'N':
			return(0);
		}
		printf("You must answer Y or N\n");
	}
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.