From b5659f308a72902befb87c81e1e4a4f1d98d209d Mon Sep 17 00:00:00 2001 From: sabetts Date: Fri, 7 Mar 2003 03:14:35 +0000 Subject: * src/main.c (main): call init_window_stuff(). Remove call to init_numbers(). (clean_up): call free_window_stuff(). Remove call to free_numbers(). * src/list.h (free_window_stuff): new prototype (init_window_stuff): likewise * src/list.c (rp_window_numset): new global (init_window_stuff): new function (free_window_stuff): new function * src/data.h (rp_window_numset): new extern * src/number.c (numset_init): new function (number_is_taken): rename to numset_num_is_taken, callers updated. (find_empty_cell): rename to numset_find_empty_cell, callers updated. (add_window_number): rename to numset_add_num, callers updated. (return_window_number): rename to numset_release, callers updated. (init_numbers): remove function (free_numbers): rename to numset_free, callers updated. (numset_num_is_taken): take struct numset* as an argument. (numset_find_empty_cell): likewise (numset_add_num): likewise (numset_request): likewise (numset_release): likewise (numset_free): likewise (numset_new): new function --- src/list.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/list.c') diff --git a/src/list.c b/src/list.c index 12d51c8..87ad967 100644 --- a/src/list.c +++ b/src/list.c @@ -29,6 +29,8 @@ LIST_HEAD(rp_unmapped_window); LIST_HEAD(rp_mapped_window); +struct numset *rp_window_numset; + /* Get the mouse position relative to the root of the specified window */ static void get_mouse_root_position (rp_window *win, int *mouse_x, int *mouse_y) @@ -669,3 +671,15 @@ get_window_list (char *fmt, char *delim, struct sbuf *buffer, sbuf_copy (buffer, MESSAGE_NO_MANAGED_WINDOWS); } } + +void +init_window_stuff () +{ + rp_window_numset = numset_new (); +} + +void +free_window_stuff () +{ + numset_free (rp_window_numset); +} -- cgit v1.2.3