From 4d314995d64885eb6cb78505bd34ebd2f7c00018 Mon Sep 17 00:00:00 2001 From: merlokk Date: Sun, 19 Nov 2017 18:37:55 +0200 Subject: [PATCH] and better.... --- client/clparser/clparser.h | 3 +++ client/cmdhf14a.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/client/clparser/clparser.h b/client/clparser/clparser.h index b55789b1..868f078e 100644 --- a/client/clparser/clparser.h +++ b/client/clparser/clparser.h @@ -11,6 +11,9 @@ #include "argtable3.h" #include "util.h" +#define arg_param_begin arg_lit0("hH", "help", "print this help and exit") +#define arg_param_end arg_end(20) + #define arg_get_lit(n)(((struct arg_lit*)argtable[n])) #define arg_get_str(n)(((struct arg_str*)argtable[n])) diff --git a/client/cmdhf14a.c b/client/cmdhf14a.c index ac5c019f..0b198373 100644 --- a/client/cmdhf14a.c +++ b/client/cmdhf14a.c @@ -737,12 +737,12 @@ int CmdHF14AAPDU(const char *cmd) { void* argtable[] = {ahelp, as, ak, at, astr, aend}; */ void* argtable[] = { - arg_lit0("hH", "help", "print this help and exit"), + arg_param_begin, arg_lit0("sS", "select", "activate field and select card"), arg_lit0("kK", "keep", "leave the signal field ON after receive response"), arg_lit0("tT", "tlv", "executes TLV decoder if it possible"), arg_str1(NULL, NULL, "", NULL), - arg_end(20) + arg_param_end }; if (CLParserParseString(cmd, argtable, sizeof(argtable) / sizeof(argtable[0]))) return 0;