aboutsummaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-01-10 14:43:43 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-01-10 14:43:43 +0000
commitfd05d07c2b7bafcfb371f96baae96dc636a5aabf (patch)
tree302eeda9625ca65218a206ecdb0936ccb56ec4d6 /window.c
parenta49e9b5b00813669f521bf94f956775fa92fce4e (diff)
downloadrtmux-fd05d07c2b7bafcfb371f96baae96dc636a5aabf.tar.gz
rtmux-fd05d07c2b7bafcfb371f96baae96dc636a5aabf.tar.bz2
rtmux-fd05d07c2b7bafcfb371f96baae96dc636a5aabf.zip
Change server-info format.
Diffstat (limited to 'window.c')
-rw-r--r--window.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/window.c b/window.c
index 2e33f192..48de0da9 100644
--- a/window.c
+++ b/window.c
@@ -1,4 +1,4 @@
-/* $Id: window.c,v 1.52 2008-12-08 16:19:51 nicm Exp $ */
+/* $Id: window.c,v 1.53 2009-01-10 14:43:43 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -99,6 +99,19 @@ winlink_next_index(struct winlinks *wwl)
fatalx("no free indexes");
}
+u_int
+winlink_count(struct winlinks *wwl)
+{
+ struct winlink *wl;
+ u_int n;
+
+ n = 0;
+ RB_FOREACH(wl, winlinks, wwl)
+ n++;
+
+ return (n);
+}
+
struct winlink *
winlink_add(struct winlinks *wwl, struct window *w, int idx)
{