Some fundamental definitions, mostly setting up for the Foundation module to manage memory for us.
§1. Build identity. First we define the build, using a notation which tangles out to the current build number as specified in the contents section of this web.
define INTOOL_NAME "inweb" define INWEB_BUILD "[[Version Number]]"
§2. Setting up the memory manager. We need to itemise the structures we'll want to allocate. To explicate this
see Foundation, but these are all struct names with either _MT
or, in one
case, _array_MT
appended. MT stands for "memory type".
enum breadcrumb_request_MT enum c_structure_MT enum chapter_MT enum enumeration_set_MT enum function_MT enum hash_table_entry_MT enum hash_table_entry_usage_MT enum macro_MT enum macro_tokens_MT enum macro_usage_MT enum nonterminal_variable_MT enum para_macro_MT enum paragraph_MT enum paragraph_tagging_MT enum preform_nonterminal_MT enum programming_language_MT enum section_MT enum source_line_array_MT enum structure_element_MT enum tangle_target_MT enum tex_results_MT enum text_literal_MT enum theme_tag_MT enum weave_format_MT enum weave_pattern_MT enum weave_target_MT enum web_MT enum writeme_asset_MT
§3. And then expand the following macros, all defined in Foundation. This makes all the necessary constructor functions for creating objects of these types.
ALLOCATE_IN_ARRAYS(source_line, 1000) ALLOCATE_INDIVIDUALLY(breadcrumb_request) ALLOCATE_INDIVIDUALLY(c_structure) ALLOCATE_INDIVIDUALLY(chapter) ALLOCATE_INDIVIDUALLY(enumeration_set) ALLOCATE_INDIVIDUALLY(function) ALLOCATE_INDIVIDUALLY(hash_table_entry_usage) ALLOCATE_INDIVIDUALLY(hash_table_entry) ALLOCATE_INDIVIDUALLY(macro_tokens) ALLOCATE_INDIVIDUALLY(macro_usage) ALLOCATE_INDIVIDUALLY(macro) ALLOCATE_INDIVIDUALLY(nonterminal_variable) ALLOCATE_INDIVIDUALLY(para_macro) ALLOCATE_INDIVIDUALLY(paragraph_tagging) ALLOCATE_INDIVIDUALLY(paragraph) ALLOCATE_INDIVIDUALLY(preform_nonterminal) ALLOCATE_INDIVIDUALLY(programming_language) ALLOCATE_INDIVIDUALLY(section) ALLOCATE_INDIVIDUALLY(structure_element) ALLOCATE_INDIVIDUALLY(tangle_target) ALLOCATE_INDIVIDUALLY(tex_results) ALLOCATE_INDIVIDUALLY(text_literal) ALLOCATE_INDIVIDUALLY(theme_tag) ALLOCATE_INDIVIDUALLY(weave_format) ALLOCATE_INDIVIDUALLY(weave_pattern) ALLOCATE_INDIVIDUALLY(weave_target) ALLOCATE_INDIVIDUALLY(web) ALLOCATE_INDIVIDUALLY(writeme_asset)
- (This section begins Chapter 1: Top Level.)
- Continue with 'Program Control'