Definitions of NeoMutt commands. More...
#include "config.h"
#include <stddef.h>
#include "address/lib.h"
#include "config/lib.h"
#include "email/lib.h"
#include "alias/lib.h"
#include "gui/lib.h"
#include "mutt.h"
#include "mutt_commands.h"
#include "command_parse.h"
#include "hook.h"
#include "keymap.h"
#include "mutt_globals.h"
#include "mutt_lua.h"
#include "score.h"
#include "sidebar/lib.h"
Go to the source code of this file.
Functions | |
ARRAY_HEAD (struct Command) | |
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 [] |
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 | ( | struct Command | ) |
Initialize commands array and register default commands.
Definition at line 136 of file mutt_commands.c.
int commands_cmp | ( | const void * | a, |
const void * | b | ||
) |
Compare two commands by name - Implements sort_t.
Definition at line 150 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 163 of file mutt_commands.c.
void mutt_commands_free | ( | void | ) |
Free Commands array.
Definition at line 175 of file mutt_commands.c.
size_t mutt_commands_array | ( | struct Command ** | first | ) |
Get Commands array.
first | Set to first element of Commands array |
size_t | Size of Commands array |
Definition at line 185 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 197 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 216 of file mutt_commands.c.
|
static |
Definition at line 49 of file mutt_commands.c.