summaryrefslogtreecommitdiff
path: root/gui/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gui/main.cc')
-rw-r--r--gui/main.cc42
1 files changed, 12 insertions, 30 deletions
diff --git a/gui/main.cc b/gui/main.cc
index ce47d10..5e45465 100644
--- a/gui/main.cc
+++ b/gui/main.cc
@@ -1,5 +1,4 @@
-#include "cli.h"
-#include "definitions.h"
+#include "pipe_spec.h"
#include "gui.h"
#include "logger.h"
#include <QApplication>
@@ -34,31 +33,24 @@ static void print_version_number()
static void err()
{
std::cerr << "Usage:\n\trisc_vector [OPTIONS]\nOptions:\n\t--debug,\t-d: "
- "turn on verbose output\n\t--memory-only,\t-m: run the memory "
- "simulator only, without a GUI.\n\t--version,\t-v: print the "
- "version information and exit\n"
+ "turn on verbose output\n\t--version,\t-v: print the version "
+ "information and exit\n"
<< std::endl;
}
-static void parseArguments(int argc, char **argv, bool &memory_only)
+static void parseArguments(int argc, char **argv)
{
struct option long_options[] = {
- {"debug", no_argument, 0, 'd'},
- {"memory-only", no_argument, 0, 'm'},
- {0, 0, 0, 0}};
+ {"debug", no_argument, 0, 'd'}, {0, 0, 0, 0}};
int opt;
- while ((opt = getopt_long(argc, argv, "d:m", long_options, NULL)) != -1) {
+ while ((opt = getopt_long(argc, argv, "d", long_options, NULL)) != -1) {
switch (opt) {
case 'd':
global_log->setLevel(DEBUG);
global_log->log(DEBUG, "DEBUG output enabled.");
break;
- case 'm':
- global_log->log(INFO, "Starting the storage CLI interface...");
- memory_only = true;
- break;
default:
err();
exit(EXIT_FAILURE);
@@ -71,21 +63,11 @@ int main(int argc, char **argv)
print_version_number();
global_log->log(INFO, "Initializing...");
- bool memory_only = false;
- parseArguments(argc, argv, memory_only);
-
- if (memory_only) {
- Cli cli;
- cli.run();
- } else {
- global_log->log(INFO, "Starting QT...");
- QApplication a(argc, argv);
- GUI w;
- w.show();
- return a.exec();
- }
+ parseArguments(argc, argv);
- global_log->log(INFO, "Cleaning up...");
- global_log->log(INFO, "Goodbye!");
- return EXIT_SUCCESS;
+ global_log->log(INFO, "Starting QT...");
+ QApplication a(argc, argv);
+ GUI w;
+ w.show();
+ return a.exec();
}