summaryrefslogtreecommitdiff
path: root/usr.bin/tmux
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2013-03-21 16:09:18 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2013-03-21 16:09:18 +0000
commitbb2f551d2454279521f9535fe6fc2751e1bf5819 (patch)
tree504ba5cc684f3b1ac576b2dad88fb950fc26c65b /usr.bin/tmux
parent11acb26f8ba0d9cfe239c44002ea5d6c27c39250 (diff)
Remove free callback for window_choose_data objects.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r--usr.bin/tmux/cmd-choose-buffer.c4
-rw-r--r--usr.bin/tmux/cmd-choose-client.c4
-rw-r--r--usr.bin/tmux/cmd-choose-list.c4
-rw-r--r--usr.bin/tmux/cmd-choose-tree.c4
-rw-r--r--usr.bin/tmux/cmd-find-window.c5
-rw-r--r--usr.bin/tmux/tmux.h5
-rw-r--r--usr.bin/tmux/window-choose.c8
7 files changed, 14 insertions, 20 deletions
diff --git a/usr.bin/tmux/cmd-choose-buffer.c b/usr.bin/tmux/cmd-choose-buffer.c
index 305e8e6d8e2..75c293d61d1 100644
--- a/usr.bin/tmux/cmd-choose-buffer.c
+++ b/usr.bin/tmux/cmd-choose-buffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-choose-buffer.c,v 1.11 2013/03/21 16:08:24 nicm Exp $ */
+/* $OpenBSD: cmd-choose-buffer.c,v 1.12 2013/03/21 16:09:17 nicm Exp $ */
/*
* Copyright (c) 2010 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -91,7 +91,7 @@ cmd_choose_buffer_exec(struct cmd *self, struct cmd_ctx *ctx)
}
free(action);
- window_choose_ready(wl->window->active, 0, NULL, NULL);
+ window_choose_ready(wl->window->active, 0, NULL);
return (CMD_RETURN_NORMAL);
}
diff --git a/usr.bin/tmux/cmd-choose-client.c b/usr.bin/tmux/cmd-choose-client.c
index ed8f8bde6fa..316a03bc7f1 100644
--- a/usr.bin/tmux/cmd-choose-client.c
+++ b/usr.bin/tmux/cmd-choose-client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-choose-client.c,v 1.14 2013/03/21 16:08:24 nicm Exp $ */
+/* $OpenBSD: cmd-choose-client.c,v 1.15 2013/03/21 16:09:17 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -101,7 +101,7 @@ cmd_choose_client_exec(struct cmd *self, struct cmd_ctx *ctx)
free(action);
window_choose_ready(wl->window->active, cur,
- cmd_choose_client_callback, NULL);
+ cmd_choose_client_callback);
return (CMD_RETURN_NORMAL);
}
diff --git a/usr.bin/tmux/cmd-choose-list.c b/usr.bin/tmux/cmd-choose-list.c
index 2bb0aa31ab2..30c40b0aeaa 100644
--- a/usr.bin/tmux/cmd-choose-list.c
+++ b/usr.bin/tmux/cmd-choose-list.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-choose-list.c,v 1.4 2013/03/21 16:08:24 nicm Exp $ */
+/* $Id: cmd-choose-list.c,v 1.5 2013/03/21 16:09:17 nicm Exp $ */
/*
* Copyright (c) 2012 Thomas Adam <thomas@xteddy.org>
@@ -89,7 +89,7 @@ cmd_choose_list_exec(struct cmd *self, struct cmd_ctx *ctx)
return (CMD_RETURN_ERROR);
}
- window_choose_ready(wl->window->active, 0, NULL, NULL);
+ window_choose_ready(wl->window->active, 0, NULL);
free(template);
diff --git a/usr.bin/tmux/cmd-choose-tree.c b/usr.bin/tmux/cmd-choose-tree.c
index 93480b21389..8c3210b8304 100644
--- a/usr.bin/tmux/cmd-choose-tree.c
+++ b/usr.bin/tmux/cmd-choose-tree.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-choose-tree.c,v 1.14 2013/03/21 16:08:24 nicm Exp $ */
+/* $OpenBSD: cmd-choose-tree.c,v 1.15 2013/03/21 16:09:17 nicm Exp $ */
/*
* Copyright (c) 2012 Thomas Adam <thomas@xteddy.org>
@@ -227,7 +227,7 @@ windows_only:
free(final_win_template_middle);
free(final_win_template_last);
- window_choose_ready(wl->window->active, cur_win, NULL, NULL);
+ window_choose_ready(wl->window->active, cur_win, NULL);
if (args_has(args, 'u'))
window_choose_expand_all(wl->window->active);
diff --git a/usr.bin/tmux/cmd-find-window.c b/usr.bin/tmux/cmd-find-window.c
index 0d47fdc8009..b972508b58b 100644
--- a/usr.bin/tmux/cmd-find-window.c
+++ b/usr.bin/tmux/cmd-find-window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-find-window.c,v 1.21 2013/03/21 16:08:24 nicm Exp $ */
+/* $OpenBSD: cmd-find-window.c,v 1.22 2013/03/21 16:09:17 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -198,8 +198,7 @@ cmd_find_window_exec(struct cmd *self, struct cmd_ctx *ctx)
window_choose_add(wl->window->active, cdata);
}
- window_choose_ready(wl->window->active, 0, cmd_find_window_callback,
- NULL);
+ window_choose_ready(wl->window->active, 0, cmd_find_window_callback);
out:
ARRAY_FREE(&find_list);
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h
index 47aad442008..164f0ce6f61 100644
--- a/usr.bin/tmux/tmux.h
+++ b/usr.bin/tmux/tmux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.h,v 1.375 2013/03/21 16:08:24 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.376 2013/03/21 16:09:17 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -2202,8 +2202,7 @@ extern const struct window_mode window_choose_mode;
void window_choose_add(struct window_pane *,
struct window_choose_data *);
void window_choose_ready(struct window_pane *,
- u_int, void (*)(struct window_choose_data *),
- void (*)(struct window_choose_data *));
+ u_int, void (*)(struct window_choose_data *));
struct window_choose_data *window_choose_data_create (int,
struct client *, struct session *);
void window_choose_data_free(struct window_choose_data *);
diff --git a/usr.bin/tmux/window-choose.c b/usr.bin/tmux/window-choose.c
index 2e947670453..48caec2c794 100644
--- a/usr.bin/tmux/window-choose.c
+++ b/usr.bin/tmux/window-choose.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: window-choose.c,v 1.33 2013/03/21 16:08:25 nicm Exp $ */
+/* $OpenBSD: window-choose.c,v 1.34 2013/03/21 16:09:17 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -103,8 +103,7 @@ window_choose_add(struct window_pane *wp, struct window_choose_data *wcd)
void
window_choose_ready(struct window_pane *wp, u_int cur,
- void (*callbackfn)(struct window_choose_data *),
- void (*freefn)(struct window_choose_data *))
+ void (*callbackfn)(struct window_choose_data *))
{
struct window_choose_mode_data *data = wp->modedata;
struct screen *s = &data->screen;
@@ -116,7 +115,6 @@ window_choose_ready(struct window_pane *wp, u_int cur,
data->callbackfn = callbackfn;
if (data->callbackfn == NULL)
data->callbackfn = window_choose_default_callback;
- data->freefn = freefn;
ARRAY_CONCAT(&data->old_list, &data->list);
@@ -256,8 +254,6 @@ window_choose_free(struct window_pane *wp)
for (i = 0; i < ARRAY_LENGTH(&data->old_list); i++) {
item = &ARRAY_ITEM(&data->old_list, i);
- if (data->freefn != NULL && item->wcd != NULL)
- data->freefn(item->wcd);
window_choose_data_free(item->wcd);
free(item->name);
}