diff --git a/Chapter 3/The Collater.w b/Chapter 3/The Collater.w index 91ee948..cd4f4a1 100644 --- a/Chapter 3/The Collater.w +++ b/Chapter 3/The Collater.w @@ -87,27 +87,24 @@ collater_state Collater::initial_state(web *W, text_stream *range, cls.into_file = into; cls.modules = NEW_LINKED_LIST(module); if (W) { - module *M; - LOOP_OVER_LINKED_LIST(M, module, W->md->as_module->dependencies) { - text_stream *owner = Collater::module_owner(M, W); - if (Str::len(owner) == 0) - ADD_TO_LINKED_LIST(M, module, cls.modules); - } - LOOP_OVER_LINKED_LIST(M, module, W->md->as_module->dependencies) { - text_stream *owner = Collater::module_owner(M, W); - if ((Str::len(owner) > 0) && (Str::ne_insensitive(owner, I"inweb"))) - ADD_TO_LINKED_LIST(M, module, cls.modules); - } - LOOP_OVER_LINKED_LIST(M, module, W->md->as_module->dependencies) { - text_stream *owner = Collater::module_owner(M, W); - if ((Str::len(owner) > 0) && (Str::eq_insensitive(owner, I"inweb"))) - ADD_TO_LINKED_LIST(M, module, cls.modules); - } + int c = LinkedLists::len(W->md->as_module->dependencies); + if (c > 0) @