Definitions of NeoMutt commands. More...
#include "config.h"
#include <stddef.h>
#include <string.h>
#include "address/lib.h"
#include "config/lib.h"
#include "email/lib.h"
#include "core/lib.h"
#include "alias/lib.h"
#include "mutt.h"
#include "mutt_commands.h"
#include "attach/lib.h"
#include "color/lib.h"
#include "command_parse.h"
#include "hook.h"
#include "keymap.h"
#include "mutt_globals.h"
#include "score.h"
Go to the source code of this file.
Functions | |
ARRAY_HEAD (CommandArray, struct Command) | |
void | mutt_commands_init (void) |
Initialize commands array and register default commands. More... | |
int | commands_cmp (const void *a, const void *b) |
Compare two commands by name - Implements sort_t -. More... | |
void | commands_register (const struct Command *cmds, const size_t num_cmds) |
Add commands to Commands array. More... | |
void | mutt_commands_free (void) |
Free Commands array. More... | |
size_t | mutt_commands_array (struct Command **first) |
Get Commands array. More... | |
struct Command * | mutt_command_get (const char *s) |
Get a Command by its name. More... | |
void | mutt_commands_apply (void *data, void(*application)(void *, const struct Command *)) |
Run a callback function on every Command. More... | |
Variables | |
static const struct Command | mutt_commands [] |
struct CommandArray | commands = ARRAY_HEAD_INITIALIZER |
Definitions of NeoMutt commands.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file mutt_commands.c.
ARRAY_HEAD | ( | CommandArray | , |
struct Command | |||
) |
void mutt_commands_init | ( | void | ) |
Initialize commands array and register default commands.
Definition at line 137 of file mutt_commands.c.
void commands_register | ( | const struct Command * | cmds, |
const size_t | num_cmds | ||
) |
Add commands to Commands array.
cmds | Array of Commands |
num_cmds | Number of Commands in the Array |
Definition at line 159 of file mutt_commands.c.
void mutt_commands_free | ( | void | ) |
Free Commands array.
Definition at line 171 of file mutt_commands.c.
size_t mutt_commands_array | ( | struct Command ** | first | ) |
Get Commands array.
first | Set to first element of Commands array |
num | Size of Commands array |
Definition at line 181 of file mutt_commands.c.
struct Command * mutt_command_get | ( | const char * | s | ) |
Get a Command by its name.
s | Command string to lookup |
ptr | Success, Command |
NULL | Error, no such command |
Definition at line 193 of file mutt_commands.c.
void mutt_commands_apply | ( | void * | data, |
void(*)(void *, const struct Command *) | application | ||
) |
Run a callback function on every Command.
data | Data to pass to the callback function |
application | Callback function |
This is used by Lua to expose all of NeoMutt's Commands.
Definition at line 212 of file mutt_commands.c.
|
static |
Definition at line 48 of file mutt_commands.c.
struct CommandArray commands = ARRAY_HEAD_INITIALIZER |
Definition at line 132 of file mutt_commands.c.