NeoMutt  2019-12-07-168-gc45f47
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 
65 {
70 };
71 
72 /* parameter to parse_mailboxes */
73 #define MUTT_NAMED (1 << 0)
74 
75 extern const struct Command Commands[];
76 
77 const struct Command *mutt_command_get(const char *s);
78 void mutt_commands_apply(void *data, void (*application)(void *, const struct Command *));
79 
80 #endif /* MUTT_MUTT_COMMANDS_H */
const struct Command * mutt_command_get(const char *s)
Get a Command by its name.
Definition: init.c:395
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
MuttSetCommand
Flags for parse_set()
Definition: mutt_commands.h:64
default is to reset all vars to default
Definition: mutt_commands.h:69
const struct Command Commands[]
Definition: mutt_commands.c:42
char * data
Pointer to data.
Definition: buffer.h:35
default is to unset all vars
Definition: mutt_commands.h:68
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
default is to set all vars
Definition: mutt_commands.h:66
default is to invert all vars
Definition: mutt_commands.h:67