NeoMutt  2019-12-07
Teaching an old dog new tricks
DOXYGEN
mutt_commands.h
Go to the documentation of this file.
1 
23 #ifndef MUTT_MUTT_COMMANDS_H
24 #define MUTT_MUTT_COMMANDS_H
25 
26 #include <stdint.h>
27 
28 struct Buffer;
29 
34 {
39 };
40 
49 typedef enum CommandResult (*command_t)(struct Buffer *buf, struct Buffer *s, unsigned long data, struct Buffer *err);
50 
54 struct Command
55 {
56  const char *name;
58  intptr_t data;
59 };
60 
61 const struct Command *mutt_command_get(const char *s);
62 void mutt_commands_apply(void *data, void (*application)(void *, const struct Command *));
63 
64 #endif /* MUTT_MUTT_COMMANDS_H */
const struct Command * mutt_command_get(const char *s)
Get a Command by its name.
Definition: init.c:2643
intptr_t data
Data or flags to pass to the command.
Definition: mutt_commands.h:58
CommandResult
Error codes for command_t parse functions.
Definition: mutt_commands.h:33
Error: Can&#39;t help the user.
Definition: mutt_commands.h:35
command_t func
Function to parse the command.
Definition: mutt_commands.h:57
String manipulation buffer.
Definition: buffer.h:33
A user-callable command.
Definition: mutt_commands.h:54
const char * name
Name of the command.
Definition: mutt_commands.h:56
enum CommandResult(* command_t)(struct Buffer *buf, struct Buffer *s, unsigned long data, struct Buffer *err)
typedef command_t - Prototype for a function to parse a command
Definition: mutt_commands.h:49
char * data
Pointer to data.
Definition: buffer.h:35
void mutt_commands_apply(void *data, void(*application)(void *, const struct Command *))
Success: Command worked.
Definition: mutt_commands.h:37
Warning: Help given to the user.
Definition: mutt_commands.h:36
Finish: Stop processing this file.
Definition: mutt_commands.h:38