#include "config.h"
#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | Command |
Enumerations | |
enum | CommandResult { MUTT_CMD_ERROR = -1 , MUTT_CMD_WARNING = -2 , MUTT_CMD_SUCCESS = 0 , MUTT_CMD_FINISH = 1 } |
Error codes for command_t parse functions. More... | |
Functions | |
struct Command * | command_get (const char *s) |
Get a Command by its name. | |
size_t | commands_array (struct Command **first) |
Get Commands array. | |
void | commands_cleanup (void) |
Free Commands array. | |
void | commands_init (void) |
Initialize commands array and register default commands. | |
void | commands_register (const struct Command *cmds, const size_t num_cmds) |
Add commands to Commands array. | |
NeoMutt commands API.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file command.h.
enum CommandResult |
Error codes for command_t parse functions.
Enumerator | |
---|---|
MUTT_CMD_ERROR | Error: Can't help the user. |
MUTT_CMD_WARNING | Warning: Help given to the user. |
MUTT_CMD_SUCCESS | Success: Command worked. |
MUTT_CMD_FINISH | Finish: Stop processing this file. |
Definition at line 35 of file command.h.
struct Command * command_get | ( | const char * | s | ) |
Get a Command by its name.
s | Command string to lookup |
ptr | Success, Command |
NULL | Error, no such command |
Definition at line 87 of file command.c.
size_t commands_array | ( | struct Command ** | first | ) |
Get Commands array.
first | Set to first element of Commands array |
num | Size of Commands array |
Definition at line 75 of file command.c.
void commands_cleanup | ( | void | ) |
void commands_init | ( | void | ) |
Initialize commands array and register default commands.
Definition at line 1730 of file commands.c.
void commands_register | ( | const struct Command * | cmds, |
const size_t | num_cmds | ||
) |
Add commands to Commands array.
cmds | Array of Commands |
num_cmds | Number of Commands in the Array |
Definition at line 53 of file command.c.