Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /tmux.h [9f3399] .. [a37323] Maximize Restore

  Switch to side-by-side view

--- a/tmux.h
+++ b/tmux.h
@@ -1,4 +1,4 @@
-/* $Id: tmux.h,v 1.590 2010-12-22 15:31:56 tcunha Exp $ */
+/* $Id: tmux.h,v 1.591 2010-12-22 15:36:44 tcunha Exp $ */
 
 /*
  * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -928,6 +928,8 @@
 TAILQ_HEAD(session_groups, session_group);
 
 struct session {
+	u_int		 idx;
+
 	char		*name;
 	char		*cwd;
 
@@ -955,8 +957,10 @@
 	int		 references;
 
 	TAILQ_ENTRY(session) gentry;
-};
-ARRAY_DECL(sessions, struct session *);
+	RB_ENTRY(session)    entry;
+};
+RB_HEAD(sessions, session);
+ARRAY_DECL(sessionslist, struct session *);
 
 /* TTY information. */
 struct tty_key {
@@ -1965,13 +1969,15 @@
 extern struct sessions sessions;
 extern struct sessions dead_sessions;
 extern struct session_groups session_groups;
+int	session_cmp(struct session *, struct session *);
+RB_PROTOTYPE(sessions, session, entry, session_cmp);
 int		 session_alive(struct session *);
 struct session	*session_find(const char *);
+struct session	*session_find_by_index(u_int);
 struct session	*session_create(const char *, const char *, const char *,
 		     struct environ *, struct termios *, int, u_int, u_int,
 		     char **);
 void		 session_destroy(struct session *);
-int		 session_index(struct session *, u_int *);
 struct session	*session_next_session(struct session *);
 struct session	*session_previous_session(struct session *);
 struct winlink	*session_new(struct session *,