+
+ /* Resize category items to fit exactly. */
+ category->items_size = category->num_items;
+ category->items = xrealloc (category->items, category->items_size * sizeof (item_t));
+
+ /* Now that the category is completely loaded, with stable
+ * pointers to every item, we can add each item to its appropriate
+ * bin. */
+ for (i = 0; i < category->num_items; i++) {
+ item_t *item = &category->items[i];
+ bin_t *bin = mnemon_get_bin (mnemon, item->count);
+
+ bin_add_item (bin, item);
+ }