summaryrefslogtreecommitdiff
path: root/console/parse.hpp
diff options
context:
space:
mode:
authorJacob Palecki <[email protected]>2020-08-11 21:16:50 -0700
committerJacob Palecki <[email protected]>2020-08-11 21:16:50 -0700
commit319eb45dee5b805eee976d7c2d6be0a9d090d3ed (patch)
treed164cf52ce420c2c51aee2e9c0fe67c5fe5b56c5 /console/parse.hpp
parentFurther comments (diff)
parentMerge pull request #13 from a1xd/write-cd (diff)
downloadrawaccel-319eb45dee5b805eee976d7c2d6be0a9d090d3ed.tar.xz
rawaccel-319eb45dee5b805eee976d7c2d6be0a9d090d3ed.zip
Merge branch 'master' into GainCap
Diffstat (limited to 'console/parse.hpp')
-rw-r--r--console/parse.hpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/console/parse.hpp b/console/parse.hpp
index 1cdb3fb..abdd36c 100644
--- a/console/parse.hpp
+++ b/console/parse.hpp
@@ -3,16 +3,12 @@
#include <iostream>
#include <rawaccel.hpp>
-#include <accel-error.hpp>
+#include <rawaccel-error.hpp>
#include "external/clipp.h"
namespace rawaccel {
- inline constexpr int SYSTEM_ERROR = -1;
- inline constexpr int PARSE_ERROR = 1;
- inline constexpr int INVALID_ARGUMENT = 2;
-
template<typename Accel, typename StrFirst, typename... StrRest>
clipp::parameter make_accel_cmd(modifier_args& args, StrFirst&& first_flag, StrRest&&... rest) {
return clipp::command(first_flag, rest...)
@@ -113,6 +109,8 @@ namespace rawaccel {
);
if (!clipp::parse(argc, argv, cli)) {
+ constexpr int PARSE_ERROR = 1;
+
std::cout << clipp::usage_lines(cli, "rawaccel", make_doc_fmt());
std::exit(PARSE_ERROR);
}