summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/alerts.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2015-10-27 15:58:44 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2015-10-27 15:58:44 +0000
commit6b5068321aea4cd3b312055d770418e4c47628ae (patch)
tree57557df7c7630b2b8c8b1a2444b249b596ca8a6e /usr.bin/tmux/alerts.c
parent1a4bf61aea2abac845e907cd3172e2b578c0806a (diff)
Move struct options into options.c.
Diffstat (limited to 'usr.bin/tmux/alerts.c')
-rw-r--r--usr.bin/tmux/alerts.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/usr.bin/tmux/alerts.c b/usr.bin/tmux/alerts.c
index 7d4436bf40c..90281b10702 100644
--- a/usr.bin/tmux/alerts.c
+++ b/usr.bin/tmux/alerts.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: alerts.c,v 1.3 2015/09/21 09:34:52 nicm Exp $ */
+/* $OpenBSD: alerts.c,v 1.4 2015/10/27 15:58:42 nicm Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -80,11 +80,11 @@ alerts_enabled(struct window *w, int flags)
struct session *s;
if (flags & WINDOW_ACTIVITY) {
- if (options_get_number(&w->options, "monitor-activity"))
+ if (options_get_number(w->options, "monitor-activity"))
return (1);
}
if (flags & WINDOW_SILENCE) {
- if (options_get_number(&w->options, "monitor-silence") != 0)
+ if (options_get_number(w->options, "monitor-silence") != 0)
return (1);
}
if (~flags & WINDOW_BELL)
@@ -92,7 +92,7 @@ alerts_enabled(struct window *w, int flags)
RB_FOREACH(s, sessions, &sessions) {
if (!session_has(s, w))
continue;
- if (options_get_number(&s->options, "bell-action") != BELL_NONE)
+ if (options_get_number(s->options, "bell-action") != BELL_NONE)
return (1);
}
return (0);
@@ -116,7 +116,7 @@ alerts_reset(struct window *w)
event_del(&w->alerts_timer);
timerclear(&tv);
- tv.tv_sec = options_get_number(&w->options, "monitor-silence");
+ tv.tv_sec = options_get_number(w->options, "monitor-silence");
log_debug("@%u alerts timer reset %u", w->id, (u_int)tv.tv_sec);
if (tv.tv_sec != 0)
@@ -160,11 +160,11 @@ alerts_check_bell(struct session *s, struct winlink *wl)
if (s->curw->window == w)
w->flags &= ~WINDOW_BELL;
- action = options_get_number(&s->options, "bell-action");
+ action = options_get_number(s->options, "bell-action");
if (action == BELL_NONE)
return (0);
- visual = options_get_number(&s->options, "visual-bell");
+ visual = options_get_number(s->options, "visual-bell");
TAILQ_FOREACH(c, &clients, entry) {
if (c->session != s || c->flags & CLIENT_CONTROL)
continue;
@@ -201,14 +201,14 @@ alerts_check_activity(struct session *s, struct winlink *wl)
if (s->curw == wl && !(s->flags & SESSION_UNATTACHED))
return (0);
- if (!options_get_number(&w->options, "monitor-activity"))
+ if (!options_get_number(w->options, "monitor-activity"))
return (0);
- if (options_get_number(&s->options, "bell-on-alert"))
+ if (options_get_number(s->options, "bell-on-alert"))
alerts_ring_bell(s);
wl->flags |= WINLINK_ACTIVITY;
- if (options_get_number(&s->options, "visual-activity")) {
+ if (options_get_number(s->options, "visual-activity")) {
TAILQ_FOREACH(c, &clients, entry) {
if (c->session != s)
continue;
@@ -233,14 +233,14 @@ alerts_check_silence(struct session *s, struct winlink *wl)
if (s->curw == wl && !(s->flags & SESSION_UNATTACHED))
return (0);
- if (options_get_number(&w->options, "monitor-silence") == 0)
+ if (options_get_number(w->options, "monitor-silence") == 0)
return (0);
- if (options_get_number(&s->options, "bell-on-alert"))
+ if (options_get_number(s->options, "bell-on-alert"))
alerts_ring_bell(s);
wl->flags |= WINLINK_SILENCE;
- if (options_get_number(&s->options, "visual-silence")) {
+ if (options_get_number(s->options, "visual-silence")) {
TAILQ_FOREACH(c, &clients, entry) {
if (c->session != s)
continue;