/* Return current line of text. Called by dialog_textbox() and print_line(). 'page' should point to start of current line before calling, and will be updated to point to start of next line.  */
static char * get_line(void)
/* Return current line of text. Called by dialog_textbox() and print_line(). 'page' should point to start of current line before calling, and will be updated to point to start of next line.  */
static char * get_line(void)
{
	int i = 0;
	static char line[MAX_LEN + 1];
	end_reached = 0;
	while (*page != '\n') {
		if (*page == '\0') {
			end_reached = 1;
			break;
		} else if (i < MAX_LEN)
			line[i++] = *(page++);
		else {
			if (i == MAX_LEN)
				line[i++] = '\0';
			page++;
		}
	}
	if (i <= MAX_LEN)
		line[i] = '\0';
	if (!end_reached)
		page++;
	return line;
}