diff options
Diffstat (limited to 'console/parse.hpp')
| -rw-r--r-- | console/parse.hpp | 8 |
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); } |