From 4198a9c37630ad3bacafae8f27ff6b272feed0b6 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 5 Nov 2008 01:19:24 +0000 Subject: TAILQ -> SLIST. --- session.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'session.c') diff --git a/session.c b/session.c index 1ca9e052..49f3ee8c 100644 --- a/session.c +++ b/session.c @@ -1,4 +1,4 @@ -/* $Id: session.c,v 1.43 2008-09-26 06:45:27 nicm Exp $ */ +/* $Id: session.c,v 1.44 2008-11-05 01:19:24 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -33,13 +33,13 @@ session_alert_cancel(struct session *s, struct winlink *wl) { struct session_alert *sa, *sb; - sa = TAILQ_FIRST(&s->alerts); + sa = SLIST_FIRST(&s->alerts); while (sa != NULL) { sb = sa; - sa = TAILQ_NEXT(sa, entry); + sa = SLIST_NEXT(sa, entry); if (wl == NULL || sb->wl == wl) { - TAILQ_REMOVE(&s->alerts, sb, entry); + SLIST_REMOVE(&s->alerts, sb, session_alert, entry); xfree(sb); } } @@ -60,7 +60,7 @@ session_alert_add(struct session *s, struct window *w, int type) sa = xmalloc(sizeof *sa); sa->wl = wl; sa->type = type; - TAILQ_INSERT_HEAD(&s->alerts, sa, entry); + SLIST_INSERT_HEAD(&s->alerts, sa, entry); } } } @@ -70,7 +70,7 @@ session_alert_has(struct session *s, struct winlink *wl, int type) { struct session_alert *sa; - TAILQ_FOREACH(sa, &s->alerts, entry) { + SLIST_FOREACH(sa, &s->alerts, entry) { if (sa->wl == wl && sa->type == type) return (1); } @@ -83,7 +83,7 @@ session_alert_has_window(struct session *s, struct window *w, int type) { struct session_alert *sa; - TAILQ_FOREACH(sa, &s->alerts, entry) { + SLIST_FOREACH(sa, &s->alerts, entry) { if (sa->wl->window == w && sa->type == type) return (1); } @@ -119,7 +119,7 @@ session_create(const char *name, const char *cmd, u_int sx, u_int sy) fatal("gettimeofday"); s->curw = s->lastw = NULL; RB_INIT(&s->windows); - TAILQ_INIT(&s->alerts); + SLIST_INIT(&s->alerts); paste_init_stack(&s->buffers); options_init(&s->options, &global_options); -- cgit