diff --git a/src/common/screen.c b/src/common/screen.c index 6f64625..7422f8a 100644 --- a/src/common/screen.c +++ b/src/common/screen.c @@ -1584,6 +1584,8 @@ void z_show_status (void) bool brief = FALSE; + return; + /* One V5 game (Wishbringer Solid Gold) contains this opcode by accident, so just return if the version number does not fit */ diff --git a/src/dumb/dumb_input.c b/src/dumb/dumb_input.c index 400cec7..cda71c2 100644 --- a/src/dumb/dumb_input.c +++ b/src/dumb/dumb_input.c @@ -55,7 +55,8 @@ static char runtime_usage[] = ; static float speed = 1; -static bool do_more_prompts = TRUE; + +#define getline getline_x enum input_type { INPUT_CHAR, @@ -80,7 +81,7 @@ static int xgetchar(void) /* Read one line, including the newline, into s. Safely avoids buffer * overruns (but that's kind of pointless because there are several * other places where I'm not so careful). */ -static void getline(char *s) +static void xgetline(char *s) { int c; char *p = s; @@ -165,12 +166,12 @@ bool dumb_handle_setting(const char *setting, bool show_cursor, bool startup) speed = atof(&setting[2]); printf("Speed Factor %g\n", speed); } else if (!strncmp(setting, "mp", 2)) { - toggle(&do_more_prompts, setting[2]); - printf("More prompts %s\n", do_more_prompts ? "ON" : "OFF"); + /* toggle(&do_more_prompts, setting[2]); */ + /* printf("More prompts %s\n", do_more_prompts ? "ON" : "OFF"); */ } else { if (!strcmp(setting, "set")) { printf("Speed Factor %g\n", speed); - printf("More Prompts %s\n", do_more_prompts ? "ON" : "OFF"); + /* printf("More Prompts %s\n", do_more_prompts ? "ON" : "OFF"); */ } return dumb_output_handle_setting(setting, show_cursor, startup); } @@ -201,10 +202,13 @@ static bool dumb_read_line(char *s, char *prompt, bool show_cursor, for (;;) { char *command; if (prompt) - fputs(prompt, stdout); + { + fputs(prompt, stdout); + fputc ('\n', stdout); + } else dumb_show_prompt(show_cursor, (timeout ? "tTD" : ")>}")[type]); - getline(s); + xgetline(s); if ((s[0] != '\\') || ((s[1] != '\0') && !islower(s[1]))) { /* Is not a command line. */ translate_special_chars(s); @@ -252,7 +256,7 @@ static bool dumb_read_line(char *s, char *prompt, bool show_cursor, type = INPUT_LINE; } } else if (!strcmp(command, "help")) { - if (!do_more_prompts) + if (1) fputs(runtime_usage, stdout); else { char *current_page, *next_page; @@ -266,7 +270,7 @@ static bool dumb_read_line(char *s, char *prompt, bool show_cursor, if (!*current_page) break; printf("HELP: Type for more, or q to stop: "); - getline(s); + xgetline(s); if (!strcmp(s, "q\n")) break; } @@ -407,7 +411,7 @@ int os_read_file_name (char *file_name, const char *default_name, int flag) void os_more_prompt (void) { - if (do_more_prompts) { + if (0) { char buf[INPUT_BUFFER_SIZE]; dumb_read_misc_line(buf, "***MORE***"); } else diff --git a/src/dumb/dumb_output.c b/src/dumb/dumb_output.c index c6a4a3b..e07f00e 100644 --- a/src/dumb/dumb_output.c +++ b/src/dumb/dumb_output.c @@ -302,8 +302,14 @@ void dumb_show_prompt(bool show_cursor, char line_type) int i; show_line_prefix(show_cursor ? cursor_row : -1, line_type); if (show_cursor) - for (i = 0; i < cursor_col; i++) - show_cell(dumb_row(cursor_row)[i]); + { + if (cursor_col > 2) + { + for (i = 0; i < cursor_col - 2; i++) + show_cell(dumb_row(cursor_row)[i]); + fputc ('\n', stdout); + } + } } static void mark_all_unchanged(void)