55 for (
int i = 0; i < num_cmds; i++)
#define ARRAY_SORT(head, fn, sdata)
Sort an array.
#define ARRAY_FIRST(head)
Convenience method to get the first element.
#define ARRAY_ADD(head, elem)
Add an element at the end of the array.
#define ARRAY_FOREACH(elem, head)
Iterate over all elements of the array.
#define ARRAY_SIZE(head)
The number of elements stored.
#define ARRAY_HEAD(name, type)
Define a named struct for arrays of elements of a certain type.
#define ARRAY_FREE(head)
Release all memory.
#define ARRAY_HEAD_INITIALIZER
Static initializer for arrays.
void commands_register(const struct Command *cmds, const size_t num_cmds)
Add commands to Commands array.
size_t commands_array(struct Command **first)
Get Commands array.
void commands_cleanup(void)
Free Commands array.
static struct CommandArray Commands
All the registered commands, e.g. alias, sidebar_pin.
struct Command * command_get(const char *s)
Get a Command by its name.
static int commands_sort(const void *a, const void *b, void *sdata)
Compare two commands by name - Implements sort_t -.
Convenience wrapper for the library headers.
int mutt_str_cmp(const char *a, const char *b)
Compare two strings, safely.
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
const char * name
Name of the command.