diff options
| author | Albert Cervin <albert@acervin.com> | 2022-12-15 18:06:59 +0100 |
|---|---|---|
| committer | Albert Cervin <albert@acervin.com> | 2022-12-15 18:06:59 +0100 |
| commit | d931b14863838a8dceed8cd95c71a75a271cca6b (patch) | |
| tree | 64e1afa0b4849628f47f29d5cdb192fd0db63240 /src/command.h | |
| parent | a73225c9b45e110d315a3fc587a82040ce8c9a13 (diff) | |
| download | dged-d931b14863838a8dceed8cd95c71a75a271cca6b.tar.gz dged-d931b14863838a8dceed8cd95c71a75a271cca6b.tar.xz dged-d931b14863838a8dceed8cd95c71a75a271cca6b.zip | |
Make minibuffer use an actual buffer
Also fix some issues with inserting multibyte chars.
Diffstat (limited to 'src/command.h')
| -rw-r--r-- | src/command.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/command.h b/src/command.h index 3e3bbfb..b02c74a 100644 --- a/src/command.h +++ b/src/command.h @@ -4,6 +4,7 @@ struct buffer; struct command_ctx { struct buffer *current_buffer; + void *userdata; }; typedef void (*command_fn)(struct command_ctx ctx, int argc, @@ -12,6 +13,7 @@ typedef void (*command_fn)(struct command_ctx ctx, int argc, struct command { const char *name; command_fn fn; + void *userdata; }; struct hashed_command { @@ -32,6 +34,9 @@ uint32_t register_command(struct commands *commands, struct command *command); void register_commands(struct commands *command_list, struct command *commands, uint32_t ncommands); +int32_t execute_command(struct command *command, struct buffer *current_buffer, + int argc, const char *argv[]); + uint32_t hash_command_name(const char *name); struct command *lookup_command(struct commands *commands, const char *name); |
