diff options
author | sabetts <sabetts> | 2000-08-27 23:21:00 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2000-08-27 23:21:00 +0000 |
commit | 98a3dea008502975d0b4958a8dc2c4f37bfa6b80 (patch) | |
tree | ec6b94f9b93632859e314bb12f544ae01f413000 /number.c | |
parent | 2f020a0d37e9bfb0b8ebc40062622ae4f200e4a1 (diff) | |
download | ratpoison-98a3dea008502975d0b4958a8dc2c4f37bfa6b80.zip |
integrated the number sources. windows now keep the number they're
given.
Diffstat (limited to 'number.c')
-rw-r--r-- | number.c | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -91,7 +91,7 @@ get_unique_window_number () /* look for a unique number, and add it to the list of taken numbers. */ i = 0; - while (add_to_list (i)) i++; + while (!add_to_list (i)) i++; return i; } @@ -112,3 +112,19 @@ return_window_number (int n) } } } + + +void +init_numbers () +{ + max_taken = 10; + num_taken = 0; + + numbers_taken = malloc (max_taken * sizeof (int)); + if (numbers_taken == NULL) + { + fprintf (stderr, "numbers.c: Cannot alloc numbers_taken.\n"); + exit (EXIT_FAILURE); + } + +} |