]>
git.zerfleddert.de Git - proxmark3-svn/blob - client/cmdparser.c
6fca29c2b4cc66841ba0564b3ec7949fd47dce51
6 void CmdsHelp(const command_t Commands
[])
8 if (Commands
[0].Name
== NULL
)
11 while (Commands
[i
].Name
)
13 if (!offline
|| Commands
[i
].Offline
)
14 PrintAndLog("%-16s %s", Commands
[i
].Name
, Commands
[i
].Help
);
19 void CmdsParse(const command_t Commands
[], const char *Cmd
)
23 memset(cmd_name
, 0, 32);
24 sscanf(Cmd
, "%31s%n", cmd_name
, &len
);
26 while (Commands
[i
].Name
&& strcmp(Commands
[i
].Name
, cmd_name
))
29 Commands
[i
].Parse(Cmd
+ len
);
31 // show help (always first in array) for selected hierarchy or if command not recognised
32 Commands
[0].Parse("help");