summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp
index cd1f5e0..d598271 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2,13 +2,13 @@
#include <getopt.h>
#include "fbsplash.h"
-void printHelp(){
+void printHelp() {
QTextStream qout(stdout);
qout << "Usage: ./fbsplash [OPTIONS]\n";
qout << "Options:\n";
qout << "-h, --help " << "Prints this help.\n";
qout.flush();
- exit(EXIT_SUCCESS);
+ exit( EXIT_SUCCESS);
}
int main(int argc, char *argv[]) {
@@ -19,9 +19,12 @@ int main(int argc, char *argv[]) {
// Command line arguements parsing
QMap<QString, QString> clOpts;
+
+ static const char *optString = "h";
+ static const struct option
+ longOpts[] = { { "help", no_argument, NULL, 'h' } };
+
int longIndex = 0;
- static const char *optString = "c:u:d:s:t:D:hl:";
- static const struct option longOpts[] = { { "help", no_argument, NULL, 'h' } };
int opt = getopt_long(argc, argv, optString, longOpts, &longIndex);
while (opt != -1) {
switch (opt) {
@@ -35,7 +38,6 @@ int main(int argc, char *argv[]) {
if (clOpts.contains("help"))
printHelp();
-
// fbsplash init
fbsplash bs;
app.exec();