summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bldg.cc4
-rw-r--r--src/cmd3.cc2
-rw-r--r--src/cmd4.cc22
-rw-r--r--src/cmd6.cc2
-rw-r--r--src/files.cc15
-rw-r--r--src/files.hpp2
-rw-r--r--src/help.cc2
-rw-r--r--src/notes.cc2
-rw-r--r--src/squeltch.cc4
-rw-r--r--src/status.cc2
10 files changed, 31 insertions, 26 deletions
diff --git a/src/bldg.cc b/src/bldg.cc
index 7095e8c3..dc82f4ac 100644
--- a/src/bldg.cc
+++ b/src/bldg.cc
@@ -332,7 +332,7 @@ static bool_ gamble_comm(int cmd)
if (cmd == BACT_GAMBLE_RULES)
{
/* Peruse the gambling help file */
- (void)show_file("gambling.txt", NULL, 0, 0);
+ show_file("gambling.txt", NULL);
}
else
{
@@ -760,7 +760,7 @@ static void town_history(void)
screen_save();
/* Peruse the building help file */
- (void)show_file("bldg.txt", NULL, 0, 0);
+ show_file("bldg.txt", NULL);
/* Load screen */
screen_load();
diff --git a/src/cmd3.cc b/src/cmd3.cc
index 98d8acf3..d6ede5a8 100644
--- a/src/cmd3.cc
+++ b/src/cmd3.cc
@@ -2040,7 +2040,7 @@ void do_cmd_cli_help()
Term_save();
/* Display the file contents */
- show_file(file_name, "Command line help", 0, 0);
+ show_file(file_name, "Command line help");
/* Restore the screen */
Term_load();
diff --git a/src/cmd4.cc b/src/cmd4.cc
index 712af79f..48fc279b 100644
--- a/src/cmd4.cc
+++ b/src/cmd4.cc
@@ -3230,7 +3230,7 @@ void do_cmd_knowledge_artifacts(void)
my_fclose(fff);
/* Display the file contents */
- show_file(file_name, "Artifacts Seen", 0, 0);
+ show_file(file_name, "Artifacts Seen");
/* Remove the file */
fd_kill(file_name);
@@ -3269,7 +3269,7 @@ void do_cmd_knowledge_traps(void)
my_fclose(fff);
/* Display the file contents */
- show_file(file_name, "Traps known", 0, 0);
+ show_file(file_name, "Traps known");
/* Remove the file */
fd_kill(file_name);
@@ -3359,7 +3359,7 @@ static void do_cmd_knowledge_uniques(void)
my_fclose(fff);
/* Display the file contents */
- show_file(file_name, "Known Uniques", 0, 0);
+ show_file(file_name, "Known Uniques");
/* Remove the file */
fd_kill(file_name);
@@ -3526,7 +3526,7 @@ static void do_cmd_knowledge_pets(void)
my_fclose(fff);
/* Display the file contents */
- show_file(file_name, "Current Pets", 0, 0);
+ show_file(file_name, "Current Pets");
/* Remove the file */
fd_kill(file_name);
@@ -3648,7 +3648,7 @@ static void do_cmd_knowledge_kill_count(void)
my_fclose(fff);
/* Display the file contents */
- show_file(file_name, "Kill Count", 0, 0);
+ show_file(file_name, "Kill Count");
/* Remove the file */
fd_kill(file_name);
@@ -3700,7 +3700,7 @@ static void do_cmd_knowledge_objects(void)
my_fclose(fff);
/* Display the file contents */
- show_file(file_name, "Known Objects", 0, 0);
+ show_file(file_name, "Known Objects");
/* Remove the file */
fd_kill(file_name);
@@ -3740,7 +3740,7 @@ static void do_cmd_knowledge_dungeons(void)
my_fclose(fff);
/* Display the file contents */
- show_file(file_name, "Recall Depths", 0, 0);
+ show_file(file_name, "Recall Depths");
/* Remove the file */
fd_kill(file_name);
@@ -3790,7 +3790,7 @@ void do_cmd_knowledge_towns(void)
my_fclose(fff);
/* Display the file contents */
- show_file(file_name, "Dungeon Towns", 0, 0);
+ show_file(file_name, "Dungeon Towns");
/* Remove the file */
fd_kill(file_name);
@@ -3819,7 +3819,7 @@ static void do_cmd_knowledge_corruptions(void)
my_fclose(fff);
/* Display the file contents */
- show_file(file_name, "Corruptions", 0, 0);
+ show_file(file_name, "Corruptions");
/* Remove the file */
fd_kill(file_name);
@@ -3924,7 +3924,7 @@ static void do_cmd_knowledge_quests(void)
my_fclose(fff);
/* Display the file contents */
- show_file(file_name, "Quest status", 0, 0);
+ show_file(file_name, "Quest status");
/* Remove the file */
fd_kill(file_name);
@@ -3949,7 +3949,7 @@ static void do_cmd_knowledge_fates(void)
my_fclose(fff);
/* Display the file contents */
- show_file(file_name, "Fate status", 0, 0);
+ show_file(file_name, "Fate status");
/* Remove the file */
fd_kill(file_name);
diff --git a/src/cmd6.cc b/src/cmd6.cc
index 0a5595fa..1752d9a8 100644
--- a/src/cmd6.cc
+++ b/src/cmd6.cc
@@ -3586,7 +3586,7 @@ void do_cmd_read_scroll(void)
cptr q = format("book-%d.txt", o_ptr->sval);
/* Peruse the help file */
- (void)show_file(q, NULL, 0, 0);
+ show_file(q, NULL);
/* Load screen */
screen_load();
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();
diff --git a/src/files.hpp b/src/files.hpp
index 5979be89..d61415f6 100644
--- a/src/files.hpp
+++ b/src/files.hpp
@@ -13,7 +13,7 @@ extern cptr describe_player_location(void);
extern errr file_character(cptr name, bool_ full);
extern errr process_pref_file_aux(char *buf);
extern errr process_pref_file(cptr name);
-extern bool_ show_file(cptr name, cptr what, int line, int mode);
+extern void show_file(cptr name, cptr what, int line = 0);
extern void do_cmd_help(void);
extern void process_player_base(void);
extern void get_name(void);
diff --git a/src/help.cc b/src/help.cc
index a6d83079..e8eec115 100644
--- a/src/help.cc
+++ b/src/help.cc
@@ -674,7 +674,7 @@ static void show_context_help(context_help_type *context_help)
screen_save();
- show_file(context_help->file_name, 0, -context_help->anchor, 0);
+ show_file(context_help->file_name, 0, -context_help->anchor);
screen_load();
}
diff --git a/src/notes.cc b/src/notes.cc
index 69269291..8804509e 100644
--- a/src/notes.cc
+++ b/src/notes.cc
@@ -37,7 +37,7 @@ void show_notes_file(void)
sprintf(caption, "Note file %s", basename);
/* Invoke show_file */
- (void)show_file(buf, caption, 0, 0);
+ show_file(buf, caption);
/* Done */
return;
diff --git a/src/squeltch.cc b/src/squeltch.cc
index bab1e5c0..69c25dfd 100644
--- a/src/squeltch.cc
+++ b/src/squeltch.cc
@@ -301,7 +301,7 @@ void do_cmd_automatizer()
if (c == '?')
{
screen_save();
- show_file("automat.txt", "Automatizer help", 0, 0);
+ show_file("automat.txt", "Automatizer help");
screen_load();
}
else if (c == '8')
@@ -375,7 +375,7 @@ void do_cmd_automatizer()
if (c == '?')
{
screen_save();
- show_file("automat.txt", "Automatizer help", 0, 0);
+ show_file("automat.txt", "Automatizer help");
screen_load();
}
else if (c == '8')
diff --git a/src/status.cc b/src/status.cc
index 67c23468..1886e5a6 100644
--- a/src/status.cc
+++ b/src/status.cc
@@ -776,7 +776,7 @@ static void status_companion(void)
my_fclose(fff);
/* Display the file contents */
- show_file(file_name, "Companion List", 0, 0);
+ show_file(file_name, "Companion List");
/* Remove the file */
fd_kill(file_name);