diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-12-31 14:35:18 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-12-31 14:35:18 +0100 |
| commit | a11d14b24b3322dddf03f5c6fb4f7d75165cd25c (patch) | |
| tree | 0dfebcf66682bbaabd48b13470582363d603422e | |
| parent | dfb4fd31240a7f19428da1b5978ddfc355c0c68c (diff) | |
| download | vis-a11d14b24b3322dddf03f5c6fb4f7d75165cd25c.tar.gz vis-a11d14b24b3322dddf03f5c6fb4f7d75165cd25c.tar.xz | |
vis: typedef function type not pointer to function
| -rw-r--r-- | vis-cmds.c | 4 | ||||
| -rw-r--r-- | vis.h | 4 |
2 files changed, 4 insertions, 4 deletions
@@ -4,11 +4,11 @@ #include "vis-lua.h" typedef struct { - CmdFunc func; + CmdFunc *func; void *data; } CmdUser; -bool vis_cmd_register(Vis *vis, const char *name, void *data, CmdFunc func) { +bool vis_cmd_register(Vis *vis, const char *name, void *data, CmdFunc *func) { if (!name) return false; if (!vis->usercmds && !(vis->usercmds = map_new())) @@ -448,11 +448,11 @@ void vis_cancel(Vis*); bool vis_cmd(Vis*, const char *cmd); /* type of user defined function which can be registered */ -typedef bool (*CmdFunc)(Vis*, Win*, void *data, bool force, +typedef bool (CmdFunc)(Vis*, Win*, void *data, bool force, const char *argv[], Cursor*, Filerange*); /* the function will be invoked whenever a command which matches a * unique prefix of the given name is executed */ -bool vis_cmd_register(Vis*, const char *name, void *data, CmdFunc); +bool vis_cmd_register(Vis*, const char *name, void *data, CmdFunc*); bool vis_cmd_unregister(Vis*, const char *name); /* execute any kind (:,?,/) of prompt command */ bool vis_prompt_cmd(Vis*, const char *cmd); |
