diff --git a/Chapter 3/The Indexer.w b/Chapter 3/The Indexer.w index 7abbf26..9b97e74 100644 --- a/Chapter 3/The Indexer.w +++ b/Chapter 3/The Indexer.w @@ -468,6 +468,8 @@ its square-bracketed parts. } else if (Regexp::match(&mr, varname, L"Section (%c+)")) { text_stream *detail = mr.exp[0]; @; + } else if (Regexp::match(&mr, varname, L"Docs")) { + @; } else if (Regexp::match(&mr, varname, L"URL \"(%c+)\"")) { text_stream *link_text = mr.exp[0]; @; @@ -620,6 +622,11 @@ use this.) @ These commands are all used in constructing relative URLs, especially for navigation purposes. +@ = + Pathnames::relative_URL(substituted, + Filenames::get_path_to(Indexer::current_file()), + Pathnames::from_text(Colonies::home())); + @ = Pathnames::relative_URL(substituted, Filenames::get_path_to(Indexer::current_file()), diff --git a/Chapter 5/HTML Formats.w b/Chapter 5/HTML Formats.w index b98ef0e..a98807a 100644 --- a/Chapter 5/HTML Formats.w +++ b/Chapter 5/HTML Formats.w @@ -369,6 +369,7 @@ void HTMLFormat::source_code(weave_format *self, text_stream *OUT, weave_target Str::substr(reference, Str::at(matter, i + N), Str::at(matter, j)); @; DISCARD_TEXT(reference); + break; } j++; } diff --git a/Chapter 6/Colonies.w b/Chapter 6/Colonies.w index 2b3f892..244bd34 100644 --- a/Chapter 6/Colonies.w +++ b/Chapter 6/Colonies.w @@ -20,6 +20,7 @@ Orb-Weaving Spiders With Communal Webbing in a Man-Made Structural Habitat = typedef struct colony { struct linked_list *members; /* of |colony_member| */ + struct text_stream *home; /* path of home repository */ MEMORY_MANAGEMENT } colony; @@ -63,6 +64,7 @@ typedef struct colony_reader_state { void Colonies::load(filename *F) { colony *C = CREATE(colony); C->members = NEW_LINKED_LIST(colony_member); + C->home = I"docs"; colony_reader_state crs; crs.province = C; crs.nav = NULL; @@ -108,6 +110,8 @@ void Colonies::read_line(text_stream *line, text_file_position *tfp, void *v_crs CM->breadcrumb_tail = crs->crumbs; CM->default_weave_pattern = Str::duplicate(crs->pattern); ADD_TO_LINKED_LIST(CM, colony_member, C->members); + } else if (Regexp::match(&mr, line, L"home: *(%c*)")) { + C->home = Str::duplicate(mr.exp[0]); } else if (Regexp::match(&mr, line, L"pattern: none")) { crs->pattern = NULL; } else if (Regexp::match(&mr, line, L"pattern: *(%c*)")) { @@ -252,6 +256,16 @@ module *Colonies::as_module(colony_member *CM, source_line *L, web_md *Wm) { WRITE_TO(err, "unable to load '%S'", CM->name); Main::error_in_web(err, L); +@ Finally: + += +text_stream *Colonies::home(void) { + colony *C; + LOOP_OVER(C, colony) + return C->home; + return I"docs"; +} + @h Cross-references. The following must decide what references like the following should refer to: = (text) @@ -291,7 +305,10 @@ int Colonies::resolve_reference_in_weave(text_stream *url, text_stream *title, @; @; } - Main::error_in_web(I"Can't find this cross-reference", L); + TEMPORARY_TEXT(err); + WRITE_TO(err, "Can't find the cross-reference '%S'", text); + Main::error_in_web(err, L); + DISCARD_TEXT(err); return FALSE; } else if (N > 1) { Main::error_in_web(I"Multiple cross-references might be meant here", L); diff --git a/Examples/goldbach/Contents.w b/Examples/goldbach/Contents.w index 516a22d..008b157 100644 --- a/Examples/goldbach/Contents.w +++ b/Examples/goldbach/Contents.w @@ -1,6 +1,6 @@ Title: goldbach Author: Graham Nelson -Purpose: A simple test web for inweb. +Purpose: This example of using inweb is a simple program to test Goldbach's Conjecture, a classic problem in number theory. Language: C Licence: This is a free, open-source program published under the Artistic License 2.0. diff --git a/Manual/Webs, Tangling and Weaving.w b/Manual/Webs, Tangling and Weaving.w index f5b39bf..f934fd9 100644 --- a/Manual/Webs, Tangling and Weaving.w +++ b/Manual/Webs, Tangling and Weaving.w @@ -227,7 +227,7 @@ much longer roster, such as: = (text) Appendix A: The Standard Rules (Independent Inform 7) "This is the body of Inform 7 source text automatically included with every - project run through the NI compiler, and which defines most of what end users + project run through the Inform compiler, and which defines most of what end users see as the Inform language." SR0 - Preamble SR1 - Physical World Model diff --git a/Tangled/inweb.c b/Tangled/inweb.c index ed11752..6853f0e 100644 --- a/Tangled/inweb.c +++ b/Tangled/inweb.c @@ -1912,9 +1912,10 @@ typedef struct writeme_asset { #line 21 "inweb/Chapter 6/Colonies.w" typedef struct colony { struct linked_list *members; /* of |colony_member| */ + struct text_stream *home; /* path of home repository */ MEMORY_MANAGEMENT } colony; -#line 36 "inweb/Chapter 6/Colonies.w" +#line 37 "inweb/Chapter 6/Colonies.w" typedef struct colony_member { int web_rather_than_module; /* |TRUE| for a web, |FALSE| for a module */ struct text_stream *name; /* the |N| in |N at P in W| */ @@ -1928,14 +1929,14 @@ typedef struct colony_member { struct linked_list *breadcrumb_tail; /* of |breadcrumb_request| */ MEMORY_MANAGEMENT } colony_member; -#line 56 "inweb/Chapter 6/Colonies.w" +#line 57 "inweb/Chapter 6/Colonies.w" typedef struct colony_reader_state { struct colony *province; struct filename *nav; struct linked_list *crumbs; /* of |breadcrumb_request| */ struct text_stream *pattern; } colony_reader_state; -#line 151 "inweb/Chapter 6/Colonies.w" +#line 155 "inweb/Chapter 6/Colonies.w" typedef struct breadcrumb_request { struct text_stream *breadcrumb_text; struct text_stream *breadcrumb_link; @@ -3269,15 +3270,15 @@ linked_list_item * Indexer__heading_topmost_on_stack(index_engine_state *ies, in void Indexer__start_CI_loop(index_engine_state *ies, int level, linked_list_item *from, linked_list_item *to, int pos) ; #line 430 "inweb/Chapter 3/The Indexer.w" void Indexer__end_CI_loop(index_engine_state *ies) ; -#line 672 "inweb/Chapter 3/The Indexer.w" +#line 679 "inweb/Chapter 3/The Indexer.w" void Indexer__list_module(OUTPUT_STREAM, module *M, int list_this) ; -#line 689 "inweb/Chapter 3/The Indexer.w" -void Indexer__transcribe_CSS(OUTPUT_STREAM, filename *CSS_file) ; #line 696 "inweb/Chapter 3/The Indexer.w" +void Indexer__transcribe_CSS(OUTPUT_STREAM, filename *CSS_file) ; +#line 703 "inweb/Chapter 3/The Indexer.w" void Indexer__copy_CSS(text_stream *line, text_file_position *tfp, void *X) ; -#line 705 "inweb/Chapter 3/The Indexer.w" +#line 712 "inweb/Chapter 3/The Indexer.w" filename * Indexer__current_file(void) ; -#line 708 "inweb/Chapter 3/The Indexer.w" +#line 715 "inweb/Chapter 3/The Indexer.w" void Indexer__set_current_file(filename *F) ; #line 16 "inweb/Chapter 3/The Weaver.w" int Weaver__weave_source(web *W, weave_target *wv) ; @@ -3731,47 +3732,47 @@ void HTMLFormat__toc(weave_format *self, text_stream *OUT, weave_target *wv, i void HTMLFormat__paragraph_heading(weave_format *self, text_stream *OUT, weave_target *wv, text_stream *TeX_macro, section *S, paragraph *P, text_stream *heading_text, text_stream *chaptermark, text_stream *sectionmark, int weight) ; #line 289 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__source_code(weave_format *self, text_stream *OUT, weave_target *wv, int tab_stops_of_indentation, text_stream *prefatory, text_stream *matter, text_stream *colouring, text_stream *concluding_comment, int starts, int finishes, int code_mode, int linked) ; -#line 440 "inweb/Chapter 5/HTML Formats.w" +#line 441 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__inline_code(weave_format *self, text_stream *OUT, weave_target *wv, int enter) ; -#line 451 "inweb/Chapter 5/HTML Formats.w" +#line 452 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__url(weave_format *self, text_stream *OUT, weave_target *wv, text_stream *url, text_stream *content, int external) ; -#line 459 "inweb/Chapter 5/HTML Formats.w" +#line 460 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__footnote_cue(weave_format *self, text_stream *OUT, weave_target *wv, text_stream *cue) ; -#line 470 "inweb/Chapter 5/HTML Formats.w" +#line 471 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__begin_footnote_text(weave_format *self, text_stream *OUT, weave_target *wv, text_stream *cue) ; -#line 480 "inweb/Chapter 5/HTML Formats.w" +#line 481 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__end_footnote_text(weave_format *self, text_stream *OUT, weave_target *wv, text_stream *cue) ; -#line 490 "inweb/Chapter 5/HTML Formats.w" +#line 491 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__display_line(weave_format *self, text_stream *OUT, weave_target *wv, text_stream *from) ; -#line 501 "inweb/Chapter 5/HTML Formats.w" +#line 502 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__item(weave_format *self, text_stream *OUT, weave_target *wv, int depth, text_stream *label) ; -#line 510 "inweb/Chapter 5/HTML Formats.w" +#line 511 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__bar(weave_format *self, text_stream *OUT, weave_target *wv) ; -#line 516 "inweb/Chapter 5/HTML Formats.w" +#line 517 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__figure(weave_format *self, text_stream *OUT, weave_target *wv, text_stream *figname, int w, int h, programming_language *pl) ; -#line 531 "inweb/Chapter 5/HTML Formats.w" +#line 532 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__embed(weave_format *self, text_stream *OUT, weave_target *wv, text_stream *service, text_stream *ID) ; -#line 570 "inweb/Chapter 5/HTML Formats.w" +#line 571 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__para_macro(weave_format *self, text_stream *OUT, weave_target *wv, para_macro *pmac, int defn) ; -#line 585 "inweb/Chapter 5/HTML Formats.w" +#line 586 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__pagebreak(weave_format *self, text_stream *OUT, weave_target *wv) ; -#line 590 "inweb/Chapter 5/HTML Formats.w" +#line 591 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__blank_line(weave_format *self, text_stream *OUT, weave_target *wv, int in_comment) ; -#line 603 "inweb/Chapter 5/HTML Formats.w" +#line 604 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__change_material(weave_format *self, text_stream *OUT, weave_target *wv, int old_material, int new_material, int content, int plainly) ; -#line 672 "inweb/Chapter 5/HTML Formats.w" +#line 673 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__change_colour(weave_format *self, text_stream *OUT, weave_target *wv, int col, int in_code) ; -#line 693 "inweb/Chapter 5/HTML Formats.w" +#line 694 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__endnote(weave_format *self, text_stream *OUT, weave_target *wv, int end) ; -#line 703 "inweb/Chapter 5/HTML Formats.w" +#line 704 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__commentary_text(weave_format *self, text_stream *OUT, weave_target *wv, text_stream *id) ; -#line 724 "inweb/Chapter 5/HTML Formats.w" +#line 725 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__locale(weave_format *self, text_stream *OUT, weave_target *wv, paragraph *par1, paragraph *par2) ; -#line 738 "inweb/Chapter 5/HTML Formats.w" +#line 739 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__tail(weave_format *self, text_stream *OUT, weave_target *wv, text_stream *comment, section *this_S) ; -#line 785 "inweb/Chapter 5/HTML Formats.w" +#line 786 "inweb/Chapter 5/HTML Formats.w" int HTMLFormat__begin_weaving_EPUB(weave_format *wf, web *W, weave_pattern *pattern) ; -#line 800 "inweb/Chapter 5/HTML Formats.w" +#line 801 "inweb/Chapter 5/HTML Formats.w" void HTMLFormat__end_weaving_EPUB(weave_format *wf, web *W, weave_pattern *pattern) ; #line 19 "inweb/Chapter 5/Weave Plugins.w" weave_plugin * WeavePlugins__new(text_stream *name) ; @@ -3825,31 +3826,33 @@ void Readme__header_harvester(text_stream *text, text_file_position *tfp, void void Readme__template_harvester(text_stream *text, text_file_position *tfp, void *state) ; #line 366 "inweb/Chapter 6/Readme Writeme.w" void Readme__readme_harvester(text_stream *text, text_file_position *tfp, void *state) ; -#line 63 "inweb/Chapter 6/Colonies.w" +#line 64 "inweb/Chapter 6/Colonies.w" void Colonies__load(filename *F) ; -#line 78 "inweb/Chapter 6/Colonies.w" +#line 80 "inweb/Chapter 6/Colonies.w" void Colonies__read_line(text_stream *line, text_file_position *tfp, void *v_crs) ; -#line 139 "inweb/Chapter 6/Colonies.w" +#line 143 "inweb/Chapter 6/Colonies.w" void Colonies__add_crumb(linked_list *L, text_stream *spec, text_file_position *tfp) ; -#line 157 "inweb/Chapter 6/Colonies.w" +#line 161 "inweb/Chapter 6/Colonies.w" breadcrumb_request * Colonies__request_breadcrumb(text_stream *arg) ; -#line 172 "inweb/Chapter 6/Colonies.w" +#line 176 "inweb/Chapter 6/Colonies.w" void Colonies__drop_initial_breadcrumbs(OUTPUT_STREAM, filename *F, linked_list *crumbs) ; -#line 182 "inweb/Chapter 6/Colonies.w" +#line 186 "inweb/Chapter 6/Colonies.w" void Colonies__write_breadcrumb(OUTPUT_STREAM, text_stream *text, text_stream *link) ; -#line 203 "inweb/Chapter 6/Colonies.w" +#line 207 "inweb/Chapter 6/Colonies.w" colony_member * Colonies__find(text_stream *T) ; -#line 221 "inweb/Chapter 6/Colonies.w" +#line 225 "inweb/Chapter 6/Colonies.w" module * Colonies__as_module(colony_member *CM, source_line *L, web_md *Wm) ; -#line 274 "inweb/Chapter 6/Colonies.w" +#line 262 "inweb/Chapter 6/Colonies.w" +text_stream * Colonies__home(void) ; +#line 288 "inweb/Chapter 6/Colonies.w" int Colonies__resolve_reference_in_weave(text_stream *url, text_stream *title, filename *for_HTML_file, text_stream *text, web_md *Wm, source_line *L) ; -#line 386 "inweb/Chapter 6/Colonies.w" +#line 403 "inweb/Chapter 6/Colonies.w" void Colonies__link_URL(OUTPUT_STREAM, text_stream *link_text, filename *F) ; -#line 395 "inweb/Chapter 6/Colonies.w" +#line 412 "inweb/Chapter 6/Colonies.w" void Colonies__reference_URL(OUTPUT_STREAM, text_stream *link_text, filename *F) ; -#line 406 "inweb/Chapter 6/Colonies.w" +#line 423 "inweb/Chapter 6/Colonies.w" void Colonies__section_URL(OUTPUT_STREAM, section_md *Sm) ; -#line 416 "inweb/Chapter 6/Colonies.w" +#line 433 "inweb/Chapter 6/Colonies.w" void Colonies__paragraph_URL(OUTPUT_STREAM, paragraph *P, section *from, int a_link) ; void register_tangled_nonterminals(void); text_stream *TL_IS_0 = NULL; @@ -4383,6 +4386,7 @@ text_stream *TL_IS_527 = NULL; text_stream *TL_IS_528 = NULL; text_stream *TL_IS_529 = NULL; text_stream *TL_IS_530 = NULL; +text_stream *TL_IS_531 = NULL; void register_tangled_text_literals(void); #line 57 "inweb/foundation-module/Chapter 2/Streams.w" #define WRITE(args...) Writers__printf(OUT, args) @@ -7228,11 +7232,11 @@ int CommandLine__read_pair_p(text_stream *opt, text_stream *opt_val, int N, ; innocuous = TRUE; break; case VERSION_CLSW: { PRINT("inweb"); - char *svn = "7-alpha.1+1A19"; + char *svn = "7-alpha.1+1A20"; if (svn[0]) PRINT(" version %s", svn); char *vname = "Escape to Danger"; if (vname[0]) PRINT(" '%s'", vname); - char *d = "13 April 2020"; + char *d = "14 April 2020"; if (d[0]) PRINT(" (%s)", d); PRINT("\n"); innocuous = TRUE; break; @@ -17265,7 +17269,7 @@ void Indexer__run_engine(text_stream *OUT, index_engine_state *ies) { if (Bibliographic__data_exists(ies->for_web->md, varname)) { { -#line 505 "inweb/Chapter 3/The Indexer.w" +#line 507 "inweb/Chapter 3/The Indexer.w" Str__copy(substituted, Bibliographic__get_datum(ies->for_web->md, varname)); } @@ -17274,7 +17278,7 @@ void Indexer__run_engine(text_stream *OUT, index_engine_state *ies) { } else if (Regexp__match(&mr, varname, L"Navigation")) { { -#line 511 "inweb/Chapter 3/The Indexer.w" +#line 513 "inweb/Chapter 3/The Indexer.w" if (ies->nav_file) { if (TextFiles__exists(ies->nav_file)) Indexer__incorporate_template(substituted, ies->for_web, ies->restrict_to_range, @@ -17291,7 +17295,7 @@ void Indexer__run_engine(text_stream *OUT, index_engine_state *ies) { } else if (Regexp__match(&mr, varname, L"Breadcrumbs")) { { -#line 524 "inweb/Chapter 3/The Indexer.w" +#line 526 "inweb/Chapter 3/The Indexer.w" Colonies__drop_initial_breadcrumbs(substituted, Indexer__current_file(), ies->crumbs); @@ -17301,7 +17305,7 @@ void Indexer__run_engine(text_stream *OUT, index_engine_state *ies) { } else if (Str__eq_wide_string(varname, L"Plugins")) { { -#line 534 "inweb/Chapter 3/The Indexer.w" +#line 536 "inweb/Chapter 3/The Indexer.w" weave_plugin *wp; LOOP_OVER_LINKED_LIST(wp, weave_plugin, ies->nav_pattern->plugins) WeavePlugins__include(OUT, ies->for_web, wp, ies->nav_pattern); @@ -17312,7 +17316,7 @@ void Indexer__run_engine(text_stream *OUT, index_engine_state *ies) { } else if (Regexp__match(&mr, varname, L"Modules")) { { -#line 541 "inweb/Chapter 3/The Indexer.w" +#line 543 "inweb/Chapter 3/The Indexer.w" module *M = ies->for_web->md->as_module; int L = LinkedLists__len(M->dependencies); if (L > 0) { @@ -17331,7 +17335,7 @@ void Indexer__run_engine(text_stream *OUT, index_engine_state *ies) { text_stream *detail = mr.exp[0]; { -#line 555 "inweb/Chapter 3/The Indexer.w" +#line 557 "inweb/Chapter 3/The Indexer.w" if (swarm_leader) if (Formats__substitute_post_processing_data(substituted, swarm_leader, detail, ies->nav_pattern) == FALSE) @@ -17344,7 +17348,7 @@ void Indexer__run_engine(text_stream *OUT, index_engine_state *ies) { text_stream *detail = mr.exp[0]; { -#line 563 "inweb/Chapter 3/The Indexer.w" +#line 565 "inweb/Chapter 3/The Indexer.w" chapter *C = CONTENT_IN_ITEM( Indexer__heading_topmost_on_stack(ies, CHAPTER_LEVEL), chapter); if (C == NULL) @@ -17352,7 +17356,7 @@ void Indexer__run_engine(text_stream *OUT, index_engine_state *ies) { ies->errors_at, lpos); else { -#line 571 "inweb/Chapter 3/The Indexer.w" +#line 573 "inweb/Chapter 3/The Indexer.w" if (Str__eq_wide_string(detail, L"Title")) { Str__copy(substituted, C->md->ch_title); } else if (Str__eq_wide_string(detail, L"Code")) { @@ -17367,7 +17371,7 @@ void Indexer__run_engine(text_stream *OUT, index_engine_state *ies) { } } -#line 568 "inweb/Chapter 3/The Indexer.w" +#line 570 "inweb/Chapter 3/The Indexer.w" ; } @@ -17377,7 +17381,7 @@ void Indexer__run_engine(text_stream *OUT, index_engine_state *ies) { text_stream *detail = mr.exp[0]; { -#line 587 "inweb/Chapter 3/The Indexer.w" +#line 589 "inweb/Chapter 3/The Indexer.w" section *S = CONTENT_IN_ITEM( Indexer__heading_topmost_on_stack(ies, SECTION_LEVEL), section); if (S == NULL) @@ -17385,7 +17389,7 @@ void Indexer__run_engine(text_stream *OUT, index_engine_state *ies) { ies->errors_at, lpos); else { -#line 595 "inweb/Chapter 3/The Indexer.w" +#line 597 "inweb/Chapter 3/The Indexer.w" if (Str__eq_wide_string(detail, L"Title")) { Str__copy(substituted, S->md->sect_title); } else if (Str__eq_wide_string(detail, L"Purpose")) { @@ -17412,59 +17416,70 @@ void Indexer__run_engine(text_stream *OUT, index_engine_state *ies) { } } -#line 592 "inweb/Chapter 3/The Indexer.w" +#line 594 "inweb/Chapter 3/The Indexer.w" ; } #line 470 "inweb/Chapter 3/The Indexer.w" +; + } else if (Regexp__match(&mr, varname, L"Docs")) { + +{ +#line 626 "inweb/Chapter 3/The Indexer.w" + Pathnames__relative_URL(substituted, + Filenames__get_path_to(Indexer__current_file()), + Pathnames__from_text(Colonies__home())); + +} +#line 472 "inweb/Chapter 3/The Indexer.w" ; } else if (Regexp__match(&mr, varname, L"URL \"(%c+)\"")) { text_stream *link_text = mr.exp[0]; { -#line 624 "inweb/Chapter 3/The Indexer.w" +#line 631 "inweb/Chapter 3/The Indexer.w" Pathnames__relative_URL(substituted, Filenames__get_path_to(Indexer__current_file()), Pathnames__from_text(link_text)); } -#line 473 "inweb/Chapter 3/The Indexer.w" +#line 475 "inweb/Chapter 3/The Indexer.w" ; } else if (Regexp__match(&mr, varname, L"Link \"(%c+)\"")) { text_stream *link_text = mr.exp[0]; { -#line 629 "inweb/Chapter 3/The Indexer.w" +#line 636 "inweb/Chapter 3/The Indexer.w" WRITE_TO(substituted, ""); } -#line 476 "inweb/Chapter 3/The Indexer.w" +#line 478 "inweb/Chapter 3/The Indexer.w" ; } else if (Regexp__match(&mr, varname, L"Menu \"(%c+)\"")) { text_stream *menu_name = mr.exp[0]; { -#line 634 "inweb/Chapter 3/The Indexer.w" +#line 641 "inweb/Chapter 3/The Indexer.w" if (ies->inside_navigation_submenu) WRITE_TO(substituted, ""); WRITE_TO(substituted, "

%S

    ", menu_name); ies->inside_navigation_submenu = TRUE; } -#line 479 "inweb/Chapter 3/The Indexer.w" +#line 481 "inweb/Chapter 3/The Indexer.w" ; } else if (Regexp__match(&mr, varname, L"Item \"(%c+)\"")) { text_stream *item_name = mr.exp[0]; text_stream *link_text = item_name; { -#line 639 "inweb/Chapter 3/The Indexer.w" +#line 646 "inweb/Chapter 3/The Indexer.w" TEMPORARY_TEXT(url); Colonies__reference_URL(url, link_text, Indexer__current_file()); { -#line 651 "inweb/Chapter 3/The Indexer.w" +#line 658 "inweb/Chapter 3/The Indexer.w" if (ies->inside_navigation_submenu == FALSE) WRITE_TO(substituted, "
      "); ies->inside_navigation_submenu = TRUE; WRITE_TO(substituted, "
    • "); @@ -17486,24 +17501,24 @@ void Indexer__run_engine(text_stream *OUT, index_engine_state *ies) { WRITE_TO(substituted, "
    • "); } -#line 641 "inweb/Chapter 3/The Indexer.w" +#line 648 "inweb/Chapter 3/The Indexer.w" ; DISCARD_TEXT(url); } -#line 483 "inweb/Chapter 3/The Indexer.w" +#line 485 "inweb/Chapter 3/The Indexer.w" ; } else if (Regexp__match(&mr, varname, L"Item \"(%c+)\" -> (%c+)")) { text_stream *item_name = mr.exp[0]; text_stream *link_text = mr.exp[1]; { -#line 645 "inweb/Chapter 3/The Indexer.w" +#line 652 "inweb/Chapter 3/The Indexer.w" TEMPORARY_TEXT(url); Colonies__link_URL(url, link_text, Indexer__current_file()); { -#line 651 "inweb/Chapter 3/The Indexer.w" +#line 658 "inweb/Chapter 3/The Indexer.w" if (ies->inside_navigation_submenu == FALSE) WRITE_TO(substituted, "
        "); ies->inside_navigation_submenu = TRUE; WRITE_TO(substituted, "
      • "); @@ -17525,12 +17540,12 @@ void Indexer__run_engine(text_stream *OUT, index_engine_state *ies) { WRITE_TO(substituted, "
      • "); } -#line 647 "inweb/Chapter 3/The Indexer.w" +#line 654 "inweb/Chapter 3/The Indexer.w" ; DISCARD_TEXT(url); } -#line 487 "inweb/Chapter 3/The Indexer.w" +#line 489 "inweb/Chapter 3/The Indexer.w" ; } else { WRITE_TO(substituted, "%S", varname); @@ -17586,7 +17601,7 @@ void Indexer__end_CI_loop(index_engine_state *ies) { ies->stack_pointer--; } -#line 672 "inweb/Chapter 3/The Indexer.w" +#line 679 "inweb/Chapter 3/The Indexer.w" void Indexer__list_module(OUTPUT_STREAM, module *M, int list_this) { if (list_this) { WRITE("
      • %S - ", M->module_name); @@ -17601,7 +17616,7 @@ void Indexer__list_module(OUTPUT_STREAM, module *M, int list_this) { Indexer__list_module(OUT, N, TRUE); } -#line 689 "inweb/Chapter 3/The Indexer.w" +#line 696 "inweb/Chapter 3/The Indexer.w" void Indexer__transcribe_CSS(OUTPUT_STREAM, filename *CSS_file) { WRITE("