summaryrefslogtreecommitdiffstats
path: root/session.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2007-08-27 20:36:52 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2007-08-27 20:36:52 +0000
commit12f7197adbf37a430266ecbe355ebb568b69eeb6 (patch)
tree7454819c0af734f6346ab4180836b99044d06e63 /session.c
parent438144692dba1aabd34d3253be61b461f15e5e6d (diff)
session_flush can go bye-bye again.
Diffstat (limited to 'session.c')
-rw-r--r--session.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/session.c b/session.c
index d3667c6b..79e394d2 100644
--- a/session.c
+++ b/session.c
@@ -1,4 +1,4 @@
-/* $Id: session.c,v 1.6 2007-08-27 15:28:07 nicm Exp $ */
+/* $Id: session.c,v 1.7 2007-08-27 20:36:52 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -124,7 +124,7 @@ session_attach(struct session *s, struct window *w)
}
/* Detach a window from a session. */
-void
+int
session_detach(struct session *s, struct window *w)
{
if (s->window == w) {
@@ -133,15 +133,10 @@ session_detach(struct session *s, struct window *w)
}
window_remove(&s->windows, w);
-}
-/* Flush session if it is empty. */
-int
-session_flush(struct session *s)
-{
+ /* Destroy session if it is empty. */
if (!ARRAY_EMPTY(&s->windows))
return (0);
-
session_destroy(s);
return (1);
}