/* Go back 'n' lines in text. Called by dialog_textbox(). 'page' will be updated to point to the desired line in 'buf'.  */
static void back_lines(int n)
/* Go back 'n' lines in text. Called by dialog_textbox(). 'page' will be updated to point to the desired line in 'buf'.  */
static void back_lines(int n)
{
	int i;
	begin_reached = 0;
	for (i = 0; i < n; i++) {
		if (*page == '\0') {
			if (end_reached) {
				end_reached = 0;
				continue;
			}
		}
		if (page == buf) {
			begin_reached = 1;
			return;
		}
		page--;
		do {
			if (page == buf) {
				begin_reached = 1;
				return;
			}
			page--;
		} while (*page != '\n');
		page++;
	}
}