summaryrefslogtreecommitdiff
path: root/number.c
diff options
context:
space:
mode:
authorsabetts <sabetts>2000-08-27 23:21:00 +0000
committersabetts <sabetts>2000-08-27 23:21:00 +0000
commit98a3dea008502975d0b4958a8dc2c4f37bfa6b80 (patch)
treeec6b94f9b93632859e314bb12f544ae01f413000 /number.c
parent2f020a0d37e9bfb0b8ebc40062622ae4f200e4a1 (diff)
downloadratpoison-98a3dea008502975d0b4958a8dc2c4f37bfa6b80.zip
integrated the number sources. windows now keep the number they're
given.
Diffstat (limited to 'number.c')
-rw-r--r--number.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/number.c b/number.c
index d1dfe3a..6bd11c6 100644
--- a/number.c
+++ b/number.c
@@ -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);
+ }
+
+}