56 for (
int i = 0; cmds[i].
name; i++)
84 const struct Command **cp = NULL;
87 const struct Command *cmd = *cp;
#define ARRAY_SORT(head, fn, sdata)
Sort an array.
#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_FREE(head)
Release all memory.
bool commands_register(struct CommandArray *ca, const struct Command *cmds)
Add commands to Commands array.
const struct Command * commands_get(struct CommandArray *ca, const char *name)
Get a Command by its name.
void commands_clear(struct CommandArray *ca)
Clear an Array of Commands.
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.