6
Copyright (C) 2004 Marc Singer
8
This program is free software; you can redistribute it and/or
9
modify it under the terms of the GNU General Public License as
10
published by the Free Software Foundation; either version 2 of the
11
License, or (at your option) any later version.
13
This program is distributed in the hope that it will be useful, but
14
WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
General Public License for more details.
18
You should have received a copy of the GNU General Public License
19
along with this program; if not, write to the Free Software
20
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
29
#if !defined (__COMMAND_H__)
30
# define __COMMAND_H__
35
#include <attributes.h>
39
typedef int (*command_func_t) (int argc, const char** argv);
44
#if !defined (CONFIG_NOHELP)
45
const char* description;
47
#if defined (CONFIG_ALLHELP)
52
#if defined (CONFIG_ALLHELP)
53
# define COMMAND_HELP(s) .help = s,
55
# define COMMAND_HELP(s)
58
#if defined (CONFIG_NOHELP)
59
# define COMMAND_DESCRIPTION(s)
61
# define COMMAND_DESCRIPTION(s) .description = s,
64
#define __command __used __section(.command)
68
/* ----- Prototypes */
72
#endif /* __COMMAND_H__ */