From 9baafaff5ead3056dbd3ae531d1560faf02e50b7 Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Fri, 5 Feb 2016 19:22:46 +0100 Subject: Simplify show_file function signature --- src/files.cc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/files.cc') diff --git a/src/files.cc b/src/files.cc index aa63c462..ab5421b5 100644 --- a/src/files.cc +++ b/src/files.cc @@ -2920,7 +2920,7 @@ struct hyperlink typedef struct hyperlink hyperlink_type; -bool_ show_file(cptr name, cptr what, int line, int mode) +static bool_ show_file_aux(cptr name, cptr what, int line) { int i, k, x; @@ -3418,7 +3418,7 @@ bool_ show_file(cptr name, cptr what, int line, int mode) strcpy(tmp, "help.hlp"); if (askfor_aux(tmp, 80)) { - if (!show_file(tmp, NULL, 0, mode)) k = ESCAPE; + if (!show_file_aux(tmp, NULL, 0)) k = ESCAPE; } } @@ -3472,7 +3472,7 @@ bool_ show_file(cptr name, cptr what, int line, int mode) if (h_ptr->link_x[cur_link] != -1) { /* Recurse on that file */ - if (!show_file(h_ptr->link[cur_link], NULL, h_ptr->link_line[cur_link], mode)) k = ESCAPE; + if (!show_file_aux(h_ptr->link[cur_link], NULL, h_ptr->link_line[cur_link])) k = ESCAPE; } } @@ -3485,7 +3485,7 @@ bool_ show_file(cptr name, cptr what, int line, int mode) if (h_ptr->link_key[i] == k) { /* Recurse on that file */ - if (!show_file(h_ptr->link[i], NULL, h_ptr->link_line[i], mode)) k = ESCAPE; + if (!show_file_aux(h_ptr->link[i], NULL, h_ptr->link_line[i])) k = ESCAPE; break; } } @@ -3501,6 +3501,11 @@ bool_ show_file(cptr name, cptr what, int line, int mode) return (TRUE); } +void show_file(cptr name, cptr what, int line) +{ + show_file_aux(name, what, line); +} + static void cmovie_clean_line(int y, char *abuf, char *cbuf) { const byte *ap = Term->scr->a[y]; @@ -3698,7 +3703,7 @@ void do_cmd_help(void) screen_save(); /* Peruse the main help file */ - (void)show_file("help.hlp", NULL, 0, 0); + show_file("help.hlp", NULL); /* Load screen */ screen_load(); -- cgit v1.2.3