summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2017-08-16 11:46:09 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2017-08-16 11:46:09 +0000
commit9916072baf00d9870c823fbafab9325948ce140f (patch)
treef818f5681d3bd6569cb1b8bb4a8a1252437c9461 /usr.bin
parentde96f794c42af966655bbd2b3c280f7675ec7290 (diff)
Rename BELL_* values to ALERT_* now they are used by more than bells,
based on a diff from Brad Town.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/alerts.c16
-rw-r--r--usr.bin/tmux/options-table.c8
-rw-r--r--usr.bin/tmux/tmux.h12
3 files changed, 18 insertions, 18 deletions
diff --git a/usr.bin/tmux/alerts.c b/usr.bin/tmux/alerts.c
index 06d5df8af05..2513966e570 100644
--- a/usr.bin/tmux/alerts.c
+++ b/usr.bin/tmux/alerts.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: alerts.c,v 1.22 2017/07/26 16:16:25 nicm Exp $ */
+/* $OpenBSD: alerts.c,v 1.23 2017/08/16 11:46:08 nicm Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -267,11 +267,11 @@ alerts_set_message(struct session *s, struct window *w, struct winlink *wl,
int flag;
/*
- * We have found an alert (bell, activity or silence), so we need
- * to notify the user. For each client attached to this session,
+ * We have found an alert (bell, activity or silence), so we need to
+ * pass it on to the user. For each client attached to this session,
* decide whether a bell (or visual message) is needed.
*
- * {bell,activity,silence}-action determines when we notify: none means
+ * {bell,activity,silence}-action determines when we alert: none means
* nothing happens, current means we only do something for the current
* window and other means only for windows other than the current.
*
@@ -280,17 +280,17 @@ alerts_set_message(struct session *s, struct window *w, struct winlink *wl,
* mean both a bell and visual message is sent.
*/
- if (action == BELL_NONE)
+ if (action == ALERT_NONE)
return;
TAILQ_FOREACH(c, &clients, entry) {
if (c->session != s || c->flags & CLIENT_CONTROL)
continue;
flag = 0;
- if (action == BELL_ANY)
+ if (action == ALERT_ANY)
flag = 1;
- else if (action == BELL_CURRENT)
+ else if (action == ALERT_CURRENT)
flag = (c->session->curw->window == w);
- else if (action == BELL_OTHER)
+ else if (action == ALERT_OTHER)
flag = (c->session->curw->window != w);
if (!flag)
continue;
diff --git a/usr.bin/tmux/options-table.c b/usr.bin/tmux/options-table.c
index 3c353bfd883..bf2708c18fc 100644
--- a/usr.bin/tmux/options-table.c
+++ b/usr.bin/tmux/options-table.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: options-table.c,v 1.91 2017/07/26 16:14:08 nicm Exp $ */
+/* $OpenBSD: options-table.c,v 1.92 2017/08/16 11:46:08 nicm Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -150,7 +150,7 @@ const struct options_table_entry options_table[] = {
.type = OPTIONS_TABLE_CHOICE,
.scope = OPTIONS_TABLE_SESSION,
.choices = options_table_bell_action_list,
- .default_num = BELL_OTHER
+ .default_num = ALERT_OTHER
},
{ .name = "assume-paste-time",
@@ -173,7 +173,7 @@ const struct options_table_entry options_table[] = {
.type = OPTIONS_TABLE_CHOICE,
.scope = OPTIONS_TABLE_SESSION,
.choices = options_table_bell_action_list,
- .default_num = BELL_ANY
+ .default_num = ALERT_ANY
},
{ .name = "default-command",
@@ -358,7 +358,7 @@ const struct options_table_entry options_table[] = {
.type = OPTIONS_TABLE_CHOICE,
.scope = OPTIONS_TABLE_SESSION,
.choices = options_table_bell_action_list,
- .default_num = BELL_OTHER
+ .default_num = ALERT_OTHER
},
{ .name = "status",
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h
index f67987f1aa6..ac1f9557c4d 100644
--- a/usr.bin/tmux/tmux.h
+++ b/usr.bin/tmux/tmux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.h,v 1.798 2017/08/02 11:10:48 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.799 2017/08/16 11:46:08 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -77,11 +77,11 @@ struct tmuxproc;
#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
#endif
-/* Bell option values. */
-#define BELL_NONE 0
-#define BELL_ANY 1
-#define BELL_CURRENT 2
-#define BELL_OTHER 3
+/* Alert option values. */
+#define ALERT_NONE 0
+#define ALERT_ANY 1
+#define ALERT_CURRENT 2
+#define ALERT_OTHER 3
/* Visual option values. */
#define VISUAL_OFF 0