don't return 1 on -help and -version

fixes #385
This commit is contained in:
tildearrow 2022-04-25 15:54:31 -05:00
parent f3f92b8035
commit 5821135b38
2 changed files with 46 additions and 31 deletions

View file

@ -43,14 +43,20 @@ typedef std::string String;
typedef std::wstring WString;
enum TAParamResult {
TA_PARAM_ERROR=0,
TA_PARAM_SUCCESS,
TA_PARAM_QUIT
};
struct TAParam {
String shortName;
String name;
String valName;
String desc;
bool value;
bool (*func)(String);
TAParam(const String& sn, const String& n, bool v, bool (*f)(String), const String& vn, const String& d):
TAParamResult (*func)(String);
TAParam(const String& sn, const String& n, bool v, TAParamResult (*f)(String), const String& vn, const String& d):
shortName(sn),
name(n),
valName(vn),