Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dosbox-staging/dosbox-staging.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc/programs.cpp')
-rw-r--r--src/misc/programs.cpp29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/misc/programs.cpp b/src/misc/programs.cpp
index 6a9503bf2..a978e88c9 100644
--- a/src/misc/programs.cpp
+++ b/src/misc/programs.cpp
@@ -29,15 +29,16 @@
#include <cstring>
#include <vector>
+#include "../dos/program_more_output.h"
#include "callback.h"
-#include "regs.h"
-#include "support.h"
-#include "cross.h"
#include "control.h"
-#include "shell.h"
+#include "cross.h"
#include "hardware.h"
#include "mapper.h"
+#include "regs.h"
+#include "shell.h"
#include "string_utils.h"
+#include "support.h"
Bitu call_program;
@@ -414,7 +415,13 @@ void CONFIG::Run(void) {
P_WRITELANG, P_WRITELANG2,
P_SECURE
} presult = P_NOMATCH;
-
+
+ auto display_help = [this]() {
+ MoreOutputStrings output(*this);
+ output.AddString(MSG_Get("SHELL_CMD_CONFIG_HELP_LONG"));
+ output.Display();
+ };
+
bool first = true;
std::vector<std::string> pvars;
// Loop through the passed parameters
@@ -499,15 +506,11 @@ void CONFIG::Run(void) {
break;
[[fallthrough]];
- case P_NOMATCH:
- WriteOut(MSG_Get("SHELL_CMD_CONFIG_HELP_LONG"));
- return;
+ case P_NOMATCH: display_help(); return;
case P_HELP: case P_HELP2: case P_HELP3: {
switch(pvars.size()) {
- case 0:
- WriteOut(MSG_Get("SHELL_CMD_CONFIG_HELP_LONG"));
- return;
+ case 0: display_help(); return;
case 1: {
if (!strcasecmp("sections",pvars[0].c_str())) {
// list the sections
@@ -541,9 +544,7 @@ void CONFIG::Run(void) {
}
break;
}
- default:
- WriteOut(MSG_Get("SHELL_CMD_CONFIG_HELP_LONG"));
- return;
+ default: display_help(); return;
}
// if we have one value in pvars, it's a section
// two values are section + property