Merge pull request #107 from p-l-/fix-hfmf
[legacy-proxmark3.git] / client / cmdparser.h
blobb7997eccec61e14fa3a285b50574b1bd0887de57
1 //-----------------------------------------------------------------------------
2 // Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
3 //
4 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
5 // at your option, any later version. See the LICENSE.txt file for the text of
6 // the license.
7 //-----------------------------------------------------------------------------
8 // Command parser
9 //-----------------------------------------------------------------------------
11 #ifndef CMDPARSER_H__
12 #define CMDPARSER_H__
14 typedef struct command_s
16 const char * Name;
17 int (*Parse)(const char *Cmd);
18 int Offline;
19 const char * Help;
20 } command_t;
22 // command_t array are expected to be NULL terminated
24 // Print help for each command in the command array
25 void CmdsHelp(const command_t Commands[]);
26 // Parse a command line
27 void CmdsParse(const command_t Commands[], const char *Cmd);
28 void dumpCommandsRecursive(const command_t cmds[], int markdown);
30 #endif