diff options
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -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) { |