diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2018-01-18 07:10:54 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2018-01-18 07:10:54 +0000 |
commit | 991afe81cfef61f0312682eb733e50be5b9e0506 (patch) | |
tree | 82ff5dc5461e354d5ed31eb77aaa981b73e66133 | |
parent | ea6d32c14e15a7ce4cdf7d2b13232fd1e24f82dc (diff) |
Remove unused hooks_run function, from Thomas Adam.
-rw-r--r-- | usr.bin/tmux/hooks.c | 29 | ||||
-rw-r--r-- | usr.bin/tmux/tmux.h | 4 |
2 files changed, 2 insertions, 31 deletions
diff --git a/usr.bin/tmux/hooks.c b/usr.bin/tmux/hooks.c index 525499f1915..79fd1bbd976 100644 --- a/usr.bin/tmux/hooks.c +++ b/usr.bin/tmux/hooks.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hooks.c,v 1.9 2016/10/16 19:36:37 nicm Exp $ */ +/* $OpenBSD: hooks.c,v 1.10 2018/01/18 07:10:53 nicm Exp $ */ /* * Copyright (c) 2012 Thomas Adam <thomas@xteddy.org> @@ -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/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h index d175a44157e..de30b0b9bfe 100644 --- a/usr.bin/tmux/tmux.h +++ b/usr.bin/tmux/tmux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.h,v 1.815 2017/12/19 15:00:39 nicm Exp $ */ +/* $OpenBSD: tmux.h,v 1.816 2018/01/18 07:10:53 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -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 *, ...); |