63 if (*line->
dptr ==
'#')
65 if (*line->
dptr ==
';')
73 const struct Command **cp = NULL;
76 const struct Command *cmd = *cp;
81 rc = cmd->
parse(token, line, cmd->
data, err);
111 if (!line || (*line ==
'\0'))
#define ARRAY_FOREACH(elem, head)
Iterate over all elements of the array.
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
void buf_seek(struct Buffer *buf, size_t offset)
Set current read/write position to offset from beginning.
void buf_reset(struct Buffer *buf)
Reset an existing Buffer.
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
CommandResult
Error codes for command_t parse functions.
@ MUTT_CMD_SUCCESS
Success: Command worked.
@ MUTT_CMD_ERROR
Error: Can't help the user.
@ MUTT_CMD_WARNING
Warning: Help given to the user.
@ MUTT_CMD_FINISH
Finish: Stop processing this file.
Convenience wrapper for the core headers.
#define mutt_debug(LEVEL,...)
@ LL_DEBUG1
Log at debug level 1.
Convenience wrapper for the library headers.
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
@ NT_COMMAND
A Command has been executed, Command.
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
enum CommandResult parse_rc_line(const char *line, struct Buffer *err)
Parse a line of user config.
enum CommandResult parse_rc_buffer(struct Buffer *line, struct Buffer *token, struct Buffer *err)
Parse a line of user config.
String manipulation buffer.
char * dptr
Current read/write position.
char * data
Pointer to data.
enum CommandResult(* parse)(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
intptr_t data
Data or flags to pass to the command.
const char * name
Name of the command.
Container for Accounts, Notifications.
struct CommandArray commands
NeoMutt commands.
struct Notify * notify
Notifications handler.