aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornicm <nicm>2018-01-18 07:10:53 +0000
committernicm <nicm>2018-01-18 07:10:53 +0000
commitc9037fde1c6fd1e32988951384d2a224591867f1 (patch)
tree112347334918eb40f89bdc05c4c16184e101f6ac
parent75842bfe66d983580dddf11b676445d5b9fa9f8a (diff)
downloadrtmux-c9037fde1c6fd1e32988951384d2a224591867f1.tar.gz
rtmux-c9037fde1c6fd1e32988951384d2a224591867f1.tar.bz2
rtmux-c9037fde1c6fd1e32988951384d2a224591867f1.zip
Remove unused hooks_run function, from Thomas Adam.
-rw-r--r--hooks.c27
-rw-r--r--tmux.h2
2 files changed, 0 insertions, 29 deletions
diff --git a/hooks.c b/hooks.c
index 832e6f84..361f3522 100644
--- a/hooks.c
+++ b/hooks.c
@@ -140,33 +140,6 @@ hooks_find(struct hooks *hooks, const char *name)
}
void
-hooks_run(struct hooks *hooks, struct client *c, struct cmd_find_state *fs,
- const char *fmt, ...)
-{
- struct hook *hook;
- va_list ap;
- char *name;
- struct cmdq_item *new_item;
-
- va_start(ap, fmt);
- xvasprintf(&name, fmt, ap);
- va_end(ap);
-
- hook = hooks_find(hooks, name);
- if (hook == NULL) {
- free(name);
- return;
- }
- log_debug("running hook %s", name);
-
- new_item = cmdq_get_command(hook->cmdlist, fs, NULL, CMDQ_NOHOOKS);
- cmdq_format(new_item, "hook", "%s", name);
- cmdq_append(c, new_item);
-
- free(name);
-}
-
-void
hooks_insert(struct hooks *hooks, struct cmdq_item *item,
struct cmd_find_state *fs, const char *fmt, ...)
{
diff --git a/tmux.h b/tmux.h
index 71fadb08..b8fc0e66 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1581,8 +1581,6 @@ void hooks_add(struct hooks *, const char *, struct cmd_list *);
void hooks_copy(struct hooks *, struct hooks *);
void hooks_remove(struct hooks *, const char *);
struct hook *hooks_find(struct hooks *, const char *);
-void printflike(4, 5) hooks_run(struct hooks *, struct client *,
- struct cmd_find_state *, const char *, ...);
void printflike(4, 5) hooks_insert(struct hooks *, struct cmdq_item *,
struct cmd_find_state *, const char *, ...);