cliparser cleaning

checked cmdhf.c and cmddata.c and tweaked cliparser.c
This commit is contained in:
mwalker33 2020-09-30 07:55:51 +10:00
parent 38358e2e2a
commit 561c5f779e
3 changed files with 6 additions and 7 deletions

View file

@ -77,7 +77,7 @@ int CLIParserParseArg(CLIParserContext *ctx, int argc, char **argv, void *vargta
PrintAndLogEx(NORMAL,"");
if (ctx->programHelp) {
PrintAndLogEx(NORMAL,_SectionTagColor_("examples:"));
PrintAndLogEx(NORMAL,_SectionTagColor_("examples/notes:"));
char *buf = NULL;
int idx = 0;
buf = realloc (buf,strlen (ctx->programHelp)+1); // more then enough as we are splitting

View file

@ -14,7 +14,7 @@
#include <stdlib.h>
#include "util.h"
#define arg_param_begin arg_lit0("hH", "help", "This help")
#define arg_param_begin arg_lit0("h", "help", "This help")
#define arg_param_end arg_end(20)
#define arg_getsize(a) (sizeof(a) / sizeof(a[0]))

View file

@ -2264,15 +2264,14 @@ static int CmdDataNDEF(const char *Cmd) {
CLIParserContext *ctx;
CLIParserInit(&ctx, "data ndef",
"Decode and print NFC Data Exchange Format (NDEF)",
"Samples:\n"
_YELLOW_("\tdata ndef -d 9101085402656e48656c6c6f5101085402656e576f726c64\n")
_YELLOW_("\tdata ndef -d 0103d020240203e02c040300fe\n")
"data ndef -d 9101085402656e48656c6c6f5101085402656e576f726c64\n"
"data ndef -d 0103d020240203e02c040300fe\n"
);
void *argtable[] = {
arg_param_begin,
arg_strx0("dD", "data", "<hex>", "NDEF data to decode"),
arg_lit0("vV", "verbose", "verbose mode"),
arg_strx0("d", "data", "<hex>", "NDEF data to decode"),
arg_lit0("v", "verbose", "verbose mode"),
arg_param_end
};
CLIExecWithReturn(ctx, Cmd, argtable, false);