aboutsummaryrefslogtreecommitdiff
path: root/src/commands.h
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2017-04-14 16:44:07 +0100
committerHarry Jeffery <harry@exec64.co.uk>2017-04-14 16:44:07 +0100
commit50759fb279b38c5db7cacf88206188b827f564b2 (patch)
tree06d773eb726db3f3b3a89383af4d891897fadee3 /src/commands.h
parent93f68f6b4c2212a80492274b9aea9a9fb43d7ec4 (diff)
downloadimv-50759fb279b38c5db7cacf88206188b827f564b2.tar.gz
Let's not have imv_commands use hidden globals
Diffstat (limited to 'src/commands.h')
-rw-r--r--src/commands.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/commands.h b/src/commands.h
index b3a78e6..df8b43b 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -18,9 +18,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef COMMANDS_H
#define COMMANDS_H
-void imv_command_register(const char *command, void (*handler)());
-void imv_command_alias(const char *command, const char *alias);
-int imv_command_exec(const char *command);
+struct imv_list;
+
+struct imv_commands {
+ struct imv_list *command_list;
+};
+
+struct imv_commands *imv_commands_create(void);
+void imv_commands_free(struct imv_commands *cmds);
+void imv_command_register(struct imv_commands *cmds, const char *command, void (*handler)());
+void imv_command_alias(struct imv_commands *cmds, const char *command, const char *alias);
+int imv_command_exec(struct imv_commands *cmds, const char *command);
#endif