#ifndef lint
static char *RCSid = "$Header: getstring.c,v 1.3 89/05/20 23:18:40 mr-frog Exp $";
#endif

/*
 * getstring.c
 *
 * get string, printing a prompt if there is one.
 *
 * from PSL Empire, 1985
 */


char *
getstring(prompt)
	char *prompt;
{
	static	char buffer[4][80];
	static	int n = 0;
	int	i;

	n++;
	if (n > 3)
		n = 0;
	i = prmptrd(prompt, buffer[n], sizeof(buffer[n]));
	if (i < 0)
		return 0;
	if (i == 0)
		buffer[n][0] = '\0';
	return buffer[n];
}
